diff options
| author | ssankaran | 2014-09-23 19:13:53 +0000 |
|---|---|---|
| committer | ssankaran | 2014-09-23 19:23:58 +0000 |
| commit | 550a751ce1bc873d333fa63fec3308d2d2a04ec5 (patch) | |
| tree | 6f3811cdb65236fc6c01361085ae28624ab872ab | |
| parent | a189e5d72f95566c9a02bf534ce46a7bf3b3f09c (diff) | |
| download | eclipse.jdt.core-550a751ce1bc873d333fa63fec3308d2d2a04ec5.tar.gz eclipse.jdt.core-550a751ce1bc873d333fa63fec3308d2d2a04ec5.tar.xz eclipse.jdt.core-550a751ce1bc873d333fa63fec3308d2d2a04ec5.zip | |
Further improvements to incorporation.
| -rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java index 7a9258f250..be626aff63 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java @@ -359,6 +359,10 @@ class BoundSet { } public void addBound(TypeBound bound, LookupEnvironment environment) { + if (bound.relation == ReductionResult.SUBTYPE && bound.right.id == TypeIds.T_JavaLangObject) + return; + if (bound.left == bound.right) //$IDENTITY-COMPARISON$ + return; InferenceVariable variable = bound.left.prototype(); ThreeSets three = this.boundsPerVariable.get(variable); if (three == null) @@ -908,6 +912,8 @@ class BoundSet { if (targetType.isBaseType()) return false; if (InferenceContext18.parameterizedWithWildcard(targetType) != null) return false; ThreeSets ts = this.boundsPerVariable.get(alpha.prototype()); + if (ts == null) + return false; if (ts.sameBounds != null) { Iterator<TypeBound> bounds = ts.sameBounds.iterator(); while (bounds.hasNext()) { @@ -949,6 +955,8 @@ class BoundSet { if (!targetType.isParameterizedType()) return false; TypeBinding g = targetType.original(); ThreeSets ts = this.boundsPerVariable.get(alpha.prototype()); + if (ts == null) + return false; Iterator<TypeBound> boundIterator; if (ts.sameBounds != null) { boundIterator = ts.sameBounds.iterator(); |
