### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java,v retrieving revision 1.22 diff -u -r1.22 ParameterizedMethodBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java 25 Jun 2006 12:37:58 -0000 1.22 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java 2 Nov 2007 14:21:06 -0000 @@ -106,6 +106,8 @@ this.returnType = Scope.substitute(substitution, this.returnType); this.parameters = Scope.substitute(substitution, this.parameters); this.thrownExceptions = Scope.substitute(substitution, this.thrownExceptions); + // error case where exception type variable would have been substituted by a non-reference type (207573) + if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; } } @@ -195,6 +197,8 @@ this.returnType = Scope.substitute(substitution, this.returnType); this.parameters = Scope.substitute(substitution, this.parameters); this.thrownExceptions = Scope.substitute(substitution, this.thrownExceptions); + // error case where exception type variable would have been substituted by a non-reference type (207573) + if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; } } Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v retrieving revision 1.310.2.1 diff -u -r1.310.2.1 Scope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 21 Aug 2007 19:09:09 -0000 1.310.2.1 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 2 Nov 2007 14:21:07 -0000 @@ -199,12 +199,15 @@ ReferenceBinding[] substitutedTypes = originalTypes; for (int i = 0, length = originalTypes.length; i < length; i++) { ReferenceBinding originalType = originalTypes[i]; - ReferenceBinding substitutedParameter = (ReferenceBinding)substitute(substitution, originalType); - if (substitutedParameter != originalType) { + TypeBinding substitutedType = substitute(substitution, originalType); + if (!(substitutedType instanceof ReferenceBinding)) { + return null; // impossible substitution + } + if (substitutedType != originalType) { if (substitutedTypes == originalTypes) { System.arraycopy(originalTypes, 0, substitutedTypes = new ReferenceBinding[length], 0, i); } - substitutedTypes[i] = substitutedParameter; + substitutedTypes[i] = (ReferenceBinding)substitutedType; } else if (substitutedTypes != originalTypes) { substitutedTypes[i] = originalType; } Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java,v retrieving revision 1.57.2.1 diff -u -r1.57.2.1 ParameterizedGenericMethodBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 10 Oct 2007 08:20:15 -0000 1.57.2.1 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 2 Nov 2007 14:21:06 -0000 @@ -283,6 +283,8 @@ this.thrownExceptions = Scope.substitute(this, ignoreRawTypeSubstitution ? originalMethod.thrownExceptions // no substitution if original was static : Scope.substitute(rawType, originalMethod.thrownExceptions)); + // error case where exception type variable would have been substituted by a non-reference type (207573) + if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; this.returnType = Scope.substitute(this, ignoreRawTypeSubstitution ? originalMethod.returnType // no substitution if original was static : Scope.substitute(rawType, originalMethod.returnType)); @@ -305,6 +307,8 @@ this.originalMethod = originalMethod; this.parameters = Scope.substitute(this, originalMethod.parameters); this.thrownExceptions = Scope.substitute(this, originalMethod.thrownExceptions); + // error case where exception type variable would have been substituted by a non-reference type (207573) + if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; this.returnType = Scope.substitute(this, originalMethod.returnType); this.wasInferred = true;// resulting from method invocation inferrence } @@ -431,6 +435,8 @@ this.inferredReturnType = inferenceContext.hasExplicitExpectedType && this.returnType != oldReturnType; this.parameters = Scope.substitute(this, this.parameters); this.thrownExceptions = Scope.substitute(this, this.thrownExceptions); + // error case where exception type variable would have been substituted by a non-reference type (207573) + if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; return this; } Index: buildnotes_jdt-core.html =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v retrieving revision 1.5933.2.51 diff -u -r1.5933.2.51 buildnotes_jdt-core.html --- buildnotes_jdt-core.html 2 Nov 2007 12:51:06 -0000 1.5933.2.51 +++ buildnotes_jdt-core.html 2 Nov 2007 14:21:06 -0000 @@ -54,7 +54,9 @@