### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v retrieving revision 1.66 diff -u -r1.66 Javadoc.java --- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 20 Aug 2009 13:21:00 -0000 1.66 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 28 Sep 2010 23:52:22 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -570,6 +570,8 @@ // If no param tags then report a problem for each declaration type parameter if (parameters != null) { + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, avoid secondary errors when <= 1.4 + reportMissing = reportMissing && scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5; int typeParametersLength = parameters.length; if (paramTypeParamLength == 0) { if (reportMissing) { Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java,v retrieving revision 1.124 diff -u -r1.124 BinaryTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 8 Sep 2010 12:55:49 -0000 1.124 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 28 Sep 2010 23:52:25 -0000 @@ -149,7 +149,12 @@ this.fPackage = packageBinding; this.fileName = binaryType.getFileName(); - char[] typeSignature = environment.globalOptions.originalSourceLevel >= ClassFileConstants.JDK1_5 ? binaryType.getGenericSignature() : null; + /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we + must internalize type variables and observe any parameterization of super class + and/or super interfaces in order to be able to detect overriding in the presence + of generics. + */ + char[] typeSignature = binaryType.getGenericSignature(); this.typeVariables = typeSignature != null && typeSignature.length > 0 && typeSignature[0] == '<' ? null // is initialized in cachePartsFrom (called from LookupEnvironment.createBinaryTypeFrom())... must set to null so isGenericType() answers true : Binding.NO_TYPE_VARIABLES; @@ -261,11 +266,14 @@ } long sourceLevel = this.environment.globalOptions.originalSourceLevel; - char[] typeSignature = null; - if (sourceLevel >= ClassFileConstants.JDK1_5) { - typeSignature = binaryType.getGenericSignature(); - this.tagBits |= binaryType.getTagBits(); - } + /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we + must internalize type variables and observe any parameterization of super class + and/or super interfaces in order to be able to detect overriding in the presence + of generics. + */ + char[] typeSignature = binaryType.getGenericSignature(); // use generic signature even in 1.4 + this.tagBits |= binaryType.getTagBits(); + char[][][] missingTypeNames = binaryType.getMissingTypeNames(); if (typeSignature == null) { char[] superclassName = binaryType.getSuperclassName(); @@ -412,7 +420,12 @@ TypeBinding returnType = null; final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5; - char[] methodSignature = use15specifics ? method.getGenericSignature() : null; + /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, Since a 1.4 project can have a 1.5 + type as a super type and the 1.5 type could be generic, we must internalize usages of type + variables properly in order to be able to apply substitutions and thus be able to detect + overriding in the presence of generics. Seeing the erased form is not good enough. + */ + char[] methodSignature = method.getGenericSignature(); // always use generic signature, even in 1.4 if (methodSignature == null) { // no generics char[] methodDescriptor = method.getMethodDescriptor(); // of the form (I[Ljava/jang/String;)V int numOfParams = 0; @@ -476,7 +489,7 @@ } else { methodModifiers |= ExtraCompilerModifiers.AccGenericSignature; // MethodTypeSignature = ParameterPart(optional) '(' TypeSignatures ')' return_typeSignature ['^' TypeSignature (optional)] - SignatureWrapper wrapper = new SignatureWrapper(methodSignature); + SignatureWrapper wrapper = new SignatureWrapper(methodSignature, use15specifics); if (wrapper.signature[wrapper.start] == '<') { // (Ljava/lang/Class;)TA; // ParameterPart = '<' ParameterSignature(s) '>' Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java,v retrieving revision 1.180 diff -u -r1.180 ClassScope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 26 Jul 2010 16:21:40 -0000 1.180 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 28 Sep 2010 23:52:28 -0000 @@ -384,9 +384,8 @@ SourceTypeBinding sourceType = this.referenceContext.binding; TypeParameter[] typeParameters = this.referenceContext.typeParameters; - - // do not construct type variables if source < 1.5 - if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) { + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level. + if (typeParameters == null || typeParameters.length == 0) { sourceType.typeVariables = Binding.NO_TYPE_VARIABLES; return; } Index: compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java,v retrieving revision 1.106 diff -u -r1.106 LookupEnvironment.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 26 Jul 2010 16:21:40 -0000 1.106 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 28 Sep 2010 23:52:32 -0000 @@ -1322,9 +1322,12 @@ } public MethodVerifier newMethodVerifier() { - return this.globalOptions.sourceLevel < ClassFileConstants.JDK1_5 - ? new MethodVerifier(this) - : new MethodVerifier15(this); // covariance only if sourceLevel is >= 1.5 + /* Always use MethodVerifier15. Even in a 1.4 project, we must internalize type variables and + observe any parameterization of super class and/or super interfaces in order to be able to + detect overriding in the presence of generics. + See https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 + */ + return new MethodVerifier15(this); } public void releaseClassFiles(org.eclipse.jdt.internal.compiler.ClassFile[] classFiles) { Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java,v retrieving revision 1.75 diff -u -r1.75 MethodScope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java 13 Sep 2010 13:26:20 -0000 1.75 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java 28 Sep 2010 23:52:34 -0000 @@ -329,8 +329,8 @@ } TypeParameter[] typeParameters = method.typeParameters(); - // do not construct type variables if source < 1.5 - if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) { + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level. + if (typeParameters == null || typeParameters.length == 0) { method.binding.typeVariables = Binding.NO_TYPE_VARIABLES; } else { method.binding.typeVariables = createTypeVariables(typeParameters, method.binding); Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java,v retrieving revision 1.115 diff -u -r1.115 MethodVerifier15.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 26 Aug 2010 15:01:12 -0000 1.115 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 28 Sep 2010 23:52:38 -0000 @@ -11,6 +11,7 @@ package org.eclipse.jdt.internal.compiler.lookup; import org.eclipse.jdt.internal.compiler.ast.TypeParameter; +import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; import org.eclipse.jdt.internal.compiler.util.SimpleSet; @@ -80,7 +81,11 @@ } boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two) { if (one.returnType == two.returnType) return true; - return areReturnTypesCompatible0(one, two); + if (this.type.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { + return areReturnTypesCompatible0(one, two); + } else { + return areTypesEqual(one.returnType.erasure(), two.returnType.erasure()); + } } boolean areTypesEqual(TypeBinding one, TypeBinding two) { if (one == two) return true; 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.373 diff -u -r1.373 Scope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 19 Aug 2010 08:24:18 -0000 1.373 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 28 Sep 2010 23:52:55 -0000 @@ -704,8 +704,8 @@ } public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters, Binding declaringElement) { - // do not construct type variables if source < 1.5 - if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level. + if (typeParameters == null || typeParameters.length == 0) return Binding.NO_TYPE_VARIABLES; PackageBinding unitPackage = compilationUnitScope().fPackage; Index: compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java,v retrieving revision 1.8 diff -u -r1.8 SignatureWrapper.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java 7 Mar 2009 01:08:09 -0000 1.8 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java 28 Sep 2010 23:52:55 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -17,11 +17,16 @@ public int start; public int end; public int bracket; + private boolean use15specifics; - public SignatureWrapper(char[] signature) { + public SignatureWrapper(char[] signature, boolean use15specifics) { this.signature = signature; this.start = 0; this.end = this.bracket = -1; + this.use15specifics = use15specifics; + } + public SignatureWrapper(char [] signature) { + this(signature, true); } public boolean atEnd() { return this.start < 0 || this.start >= this.signature.length; @@ -46,9 +51,33 @@ this.end = this.start; } - this.start = this.end + 1; // skip ';' + if (this.use15specifics || this.end != this.bracket) { + this.start = this.end + 1; // skip ';' + } else { + this.start = skipAngleContents(this.end) + 1; // skip <<>*>; + this.bracket = -1; + } return this.end; } + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, do not expose generics if we shouldn't + public int skipAngleContents(int i) { + if (this.signature[i] != '<') { + return i; + } + int depth = 0, length = this.signature.length; + for (++i; i < length; i++) { + switch(this.signature[i]) { + case '<' : + depth++; + break; + case '>' : + if (--depth < 0) + return i + 1; + break; + } + } + return i; + } public char[] nextWord() { this.end = CharOperation.indexOf(';', this.signature, this.start); if (this.bracket <= this.start) // already know it if its > start Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v retrieving revision 1.422 diff -u -r1.422 ProblemReporter.java --- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 21 Sep 2010 14:02:58 -0000 1.422 +++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 28 Sep 2010 23:53:14 -0000 @@ -1850,6 +1850,7 @@ currentMethod.sourceEnd()); } public void finalVariableBound(TypeVariableBinding typeVariable, TypeReference typeRef) { + if (this.options.sourceLevel < ClassFileConstants.JDK1_5) return; int severity = computeSeverity(IProblem.FinalBoundForTypeVariable); if (severity == ProblemSeverities.Ignore) return; this.handle( @@ -7083,6 +7084,9 @@ } } public void unsafeReturnTypeOverride(MethodBinding currentMethod, MethodBinding inheritedMethod, SourceTypeBinding type) { + if (this.options.sourceLevel < ClassFileConstants.JDK1_5) { + return; + } int severity = computeSeverity(IProblem.UnsafeReturnTypeOverride); if (severity == ProblemSeverities.Ignore) return; int start = type.sourceStart(); Index: model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java,v retrieving revision 1.68 diff -u -r1.68 SourceTypeConverter.java --- model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 8 Sep 2010 12:55:49 -0000 1.68 +++ model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 28 Sep 2010 23:53:16 -0000 @@ -291,21 +291,22 @@ int start = methodInfo.getNameSourceStart(); int end = methodInfo.getNameSourceEnd(); - // convert 1.5 specific constructs only if compliance is 1.5 or above + /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, Even when this type is being constructed + on behalf of a 1.4 project we must internalize type variables properly in order to be able to + recognize usages of them in the method signature, to apply substitutions and thus to be able to + detect overriding in the presence of generics. If we simply drop them, when the method signature + refers to the type parameter, we won't know it should be bound to the type parameter and perform + incorrect lookup and may mistakenly end up with missing types + */ TypeParameter[] typeParams = null; - // Digest type parameters if compliance level of current project or its prerequisite is >= 1.5 - // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=305259 - if (this.has1_5Compliance || this.problemReporter.options.complianceLevel >= ClassFileConstants.JDK1_5) { - /* convert type parameters */ - char[][] typeParameterNames = methodInfo.getTypeParameterNames(); - if (typeParameterNames != null) { - int parameterCount = typeParameterNames.length; - if (parameterCount > 0) { // method's type parameters must be null if no type parameter - char[][][] typeParameterBounds = methodInfo.getTypeParameterBounds(); - typeParams = new TypeParameter[parameterCount]; - for (int i = 0; i < parameterCount; i++) { - typeParams[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end); - } + char[][] typeParameterNames = methodInfo.getTypeParameterNames(); + if (typeParameterNames != null) { + int parameterCount = typeParameterNames.length; + if (parameterCount > 0) { // method's type parameters must be null if no type parameter + char[][][] typeParameterBounds = methodInfo.getTypeParameterBounds(); + typeParams = new TypeParameter[parameterCount]; + for (int i = 0; i < parameterCount; i++) { + typeParams[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end); } } } @@ -465,24 +466,24 @@ /* convert annotations */ type.annotations = convertAnnotations(typeHandle); } - // Digest type parameters if compliance level of current project or its prerequisite is >= 1.5 - // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=323633 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=305259 - if (this.has1_5Compliance || this.problemReporter.options.complianceLevel >= ClassFileConstants.JDK1_5) { - /* convert type parameters */ - char[][] typeParameterNames = typeInfo.getTypeParameterNames(); - if (typeParameterNames.length > 0) { - int parameterCount = typeParameterNames.length; - char[][][] typeParameterBounds = typeInfo.getTypeParameterBounds(); - type.typeParameters = new TypeParameter[parameterCount]; - for (int i = 0; i < parameterCount; i++) { - type.typeParameters[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end); - } + /* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we + must internalize type variables and observe any parameterization of super class + and/or super interfaces in order to be able to detect overriding in the presence + of generics. + */ + char[][] typeParameterNames = typeInfo.getTypeParameterNames(); + if (typeParameterNames.length > 0) { + int parameterCount = typeParameterNames.length; + char[][][] typeParameterBounds = typeInfo.getTypeParameterBounds(); + type.typeParameters = new TypeParameter[parameterCount]; + for (int i = 0; i < parameterCount; i++) { + type.typeParameters[i] = createTypeParameter(typeParameterNames[i], typeParameterBounds[i], start, end); } } /* set superclass and superinterfaces */ if (typeInfo.getSuperclassName() != null) { - type.superclass = createTypeReference(typeInfo.getSuperclassName(), start, end); + type.superclass = createTypeReference(typeInfo.getSuperclassName(), start, end, true /* include generics */); type.superclass.bits |= ASTNode.IsSuperType; } char[][] interfaceNames = typeInfo.getInterfaceNames(); @@ -490,7 +491,7 @@ if (interfaceCount > 0) { type.superInterfaces = new TypeReference[interfaceCount]; for (int i = 0; i < interfaceCount; i++) { - type.superInterfaces[i] = createTypeReference(interfaceNames[i], start, end); + type.superInterfaces[i] = createTypeReference(interfaceNames[i], start, end, true /* include generics */); type.superInterfaces[i].bits |= ASTNode.IsSuperType; } } Index: model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java,v retrieving revision 1.6 diff -u -r1.6 TypeConverter.java --- model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java 22 Sep 2010 04:06:21 -0000 1.6 +++ model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java 28 Sep 2010 23:53:17 -0000 @@ -107,11 +107,25 @@ protected TypeReference createTypeReference( char[] typeName, int start, + int end, + boolean includeGenericsAnyway) { + + int length = typeName.length; + this.namePos = 0; + return decodeType(typeName, length, start, end, true); + } + + /* + * Build a type reference from a readable name, e.g. java.lang.Object[][] + */ + protected TypeReference createTypeReference( + char[] typeName, + int start, int end) { int length = typeName.length; this.namePos = 0; - return decodeType(typeName, length, start, end); + return decodeType(typeName, length, start, end, false); } /* @@ -351,7 +365,7 @@ } } - private TypeReference decodeType(char[] typeName, int length, int start, int end) { + private TypeReference decodeType(char[] typeName, int length, int start, int end, boolean includeGenericsAnyway) { int identCount = 1; int dim = 0; int nameFragmentStart = this.namePos, nameFragmentEnd = -1; @@ -373,7 +387,7 @@ } this.namePos += max; Wildcard result = new Wildcard(Wildcard.SUPER); - result.bound = decodeType(typeName, length, start, end); + result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway); result.sourceStart = start; result.sourceEnd = end; return result; @@ -389,7 +403,7 @@ } this.namePos += max; Wildcard result = new Wildcard(Wildcard.EXTENDS); - result.bound = decodeType(typeName, length, start, end); + result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway); result.sourceStart = start; result.sourceEnd = end; return result; @@ -414,23 +428,27 @@ identCount ++; break; case '<' : - /* We need to convert and preserve 1.5 specific constructs only if compliance is 1.5 or above, - but in all cases, we must skip over them to see if there are any applicable type fragments - after the type parameters: i.e we just aren't done having seen a '<' in 1.4 mode. Because of - the way type signatures are encoded, TypeConverter.decodeType(String, int, int, int) is immune + /* We need to convert and preserve 1.5 specific constructs either if compliance is 1.5 or above, + or the caller has explicitly requested generics to be included. The parameter includeGenericsAnyway + should be used by the caller to signal that in the calling context generics information must be + internalized even when the requesting project is 1.4. But in all cases, we must skip over them to + see if there are any applicable type fragments after the type parameters: i.e we just aren't done + having seen a '<' in 1.4 mode. + + Because of the way type signatures are encoded, TypeConverter.decodeType(String, int, int, int) is immune to this problem. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=325633 */ - if (this.has1_5Compliance) { + if (this.has1_5Compliance || includeGenericsAnyway) { if (fragments == null) fragments = new ArrayList(2); } nameFragmentEnd = this.namePos-1; - if (this.has1_5Compliance) { + if (this.has1_5Compliance || includeGenericsAnyway) { char[][] identifiers = CharOperation.splitOn('.', typeName, nameFragmentStart, this.namePos); fragments.add(identifiers); } this.namePos++; // skip '<' - TypeReference[] arguments = decodeTypeArguments(typeName, length, start, end); // positionned on '>' at end - if (this.has1_5Compliance) { + TypeReference[] arguments = decodeTypeArguments(typeName, length, start, end, includeGenericsAnyway); // positionned on '>' at end + if (this.has1_5Compliance || includeGenericsAnyway) { fragments.add(arguments); identCount = 0; nameFragmentStart = -1; @@ -519,11 +537,11 @@ } } - private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end) { + private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end, boolean includeGenericsAnyway) { ArrayList argumentList = new ArrayList(1); int count = 0; argumentsLoop: while (this.namePos < length) { - TypeReference argument = decodeType(typeName, length, start, end); + TypeReference argument = decodeType(typeName, length, start, end, includeGenericsAnyway); count++; argumentList.add(argument); if (this.namePos >= length) break argumentsLoop; #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java,v retrieving revision 1.42 diff -u -r1.42 ComplianceDiagnoseTest.java --- src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 27 Aug 2009 15:26:58 -0000 1.42 +++ src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 28 Sep 2010 23:53:23 -0000 @@ -1446,11 +1446,16 @@ }; String expected13ProblemLog = - "----------\n" + - "1. ERROR in X.java (at line 1)\n" + - " public class X X(T t){\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 2)\n" + - " public X(T t){\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " }\n" + - " ^\n" + - "Syntax error on token \"}\", delete this token\n" + - "----------\n" + - "4. ERROR in X.java (at line 9)\n" + - " super(\"SUCCESS\");\n" + - " ^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "5. ERROR in X.java (at line 9)\n" + - " super(\"SUCCESS\");\n" + - " ^^^^^^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " public X(T t){\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 5)\n" + + " }\n" + + " ^\n" + + "Syntax error on token \"}\", delete this token\n" + + "----------\n" + + "3. ERROR in X.java (at line 9)\n" + + " super(\"SUCCESS\");\n" + + " ^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in X.java (at line 9)\n" + + " super(\"SUCCESS\");\n" + + " ^^^^^^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"; String expected14ProblemLog = expected13ProblemLog; Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java,v retrieving revision 1.35 diff -u -r1.35 JavadocTest_1_3.java --- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java 28 Apr 2009 17:17:34 -0000 1.35 +++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java 28 Sep 2010 23:53:27 -0000 @@ -1287,27 +1287,32 @@ " public void foo(int val, Object obj) {}\n" + "}" }, - "----------\n" + - "1. ERROR in X.java (at line 4)\n" + - " * @param Type parameter 2\n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "2. ERROR in X.java (at line 5)\n" + - " * @param Type parameter 2\n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "3. ERROR in X.java (at line 6)\n" + - " * @param Type parameter 1\n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "4. ERROR in X.java (at line 10)\n" + - " public void foo(int val, Object obj) {}\n" + - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " * @param Type parameter 2\n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "2. ERROR in X.java (at line 5)\n" + + " * @param Type parameter 2\n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "3. ERROR in X.java (at line 6)\n" + + " * @param Type parameter 1\n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "4. ERROR in X.java (at line 10)\n" + + " public void foo(int val, Object obj) {}\n" + + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in X.java (at line 10)\n" + + " public void foo(int val, Object obj) {}\n" + + " ^^^^^^^^^^\n" + + "Exceptions cannot be resolved to a type\n" + + "----------\n" ); } public void test038() { @@ -1437,36 +1442,21 @@ " G(E e) {}\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 2)\n" + - " * @see G#G(Object)\n" + - " ^^^^^^^^^\n" + - "Javadoc: The constructor G(Object) is undefined\n" + - "----------\n" + - "2. ERROR in X.java (at line 3)\n" + - " * @see G#G(Exception)\n" + - " ^^^^^^^^^^^^\n" + - "Javadoc: The constructor G(Exception) is undefined\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " public class X extends G {\n" + - " ^^^^^^^^^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in X.java (at line 6)\n" + - " X(Exception exc) { super(exc);}\n" + - " ^^^^^^^^^^^\n" + - "The constructor G(E) refers to the missing type E\n" + - "----------\n" + - "5. ERROR in X.java (at line 8)\n" + - " class G {\n" + - " ^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "6. ERROR in X.java (at line 9)\n" + - " G(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " * @see G#G(Object)\n" + + " ^^^^^^^^^\n" + + "Javadoc: The constructor G(Object) is undefined\n" + + "----------\n" + + "2. ERROR in X.java (at line 5)\n" + + " public class X extends G {\n" + + " ^^^^^^^^^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in X.java (at line 8)\n" + + " class G {\n" + + " ^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n" ); } @@ -1497,31 +1487,31 @@ " public void testCompareTo() {}\n" + "}" }, - "----------\n" + - "1. ERROR in X.java (at line 2)\n" + - " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + - " ^^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 2)\n" + - " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in X.java (at line 2)\n" + - " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in X.java (at line 6)\n" + - " public static > int compareTo(final X first, final X firstPrime)\n" + - " ^^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "5. ERROR in X.java (at line 14)\n" + - " * {@link ComparableUtils#compareTo(Object, Object)}.\n" + - " ^^^^^^^^^\n" + - "Javadoc: The method compareTo(Object, Object, Class) in the type ComparableUtils is not applicable for the arguments (Object, Object)\n" + + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + + " ^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 2)\n" + + " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in X.java (at line 6)\n" + + " public static > int compareTo(final X first, final X firstPrime)\n" + + " ^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. WARNING in X.java (at line 6)\n" + + " public static > int compareTo(final X first, final X firstPrime)\n" + + " ^\n" + + "The type parameter X is hiding the type X\n" + + "----------\n" + + "5. ERROR in X.java (at line 14)\n" + + " * {@link ComparableUtils#compareTo(Object, Object)}.\n" + + " ^^^^^^^^^\n" + + "Javadoc: Bound mismatch: The generic method compareTo(X, X) of type ComparableUtils is not applicable for the arguments (Object, Object). The inferred type Object is not a valid substitute for the bounded parameter >\n" + "----------\n"); } @@ -1560,71 +1550,41 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Test#add(T) \n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see #add(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 4)\n" + - " * @see Test#Test(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in Test.java (at line 5)\n" + - " * @see #Test(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 11)\n" + - " public class Test {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "6. ERROR in Test.java (at line 12)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "7. ERROR in Test.java (at line 13)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "8. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "9. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "10. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "11. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "12. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "13. ERROR in Test.java (at line 20)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Test#add(T) \n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see #add(T)\n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + + "----------\n" + + "3. ERROR in Test.java (at line 4)\n" + + " * @see Test#Test(T)\n" + + " ^^^^^^^\n" + + "Javadoc: The constructor Test(T) is undefined\n" + + "----------\n" + + "4. ERROR in Test.java (at line 5)\n" + + " * @see #Test(T)\n" + + " ^^^^^^^\n" + + "Javadoc: The constructor Test(T) is undefined\n" + + "----------\n" + + "5. ERROR in Test.java (at line 11)\n" + + " public class Test {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "6. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "7. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127b() { @@ -1658,61 +1618,31 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Sub#add(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Sub#Sub(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 11)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 12)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 13)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 20)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Sub#add(T)\n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Sub#Sub(T)\n" + + " ^^^^^^\n" + + "Javadoc: The constructor Sub(T) is undefined\n" + + "----------\n" + + "3. ERROR in Test.java (at line 11)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127c() { @@ -1743,61 +1673,31 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Sub#add(E) \n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Sub#Sub(E)\n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 9)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 10)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 17)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Sub#add(E) \n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Sub#Sub(E)\n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "3. ERROR in Test.java (at line 8)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127d() { @@ -1833,77 +1733,37 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(E)\n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(E)\n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 9)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 10)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 17)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated1#add(E)\n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Unrelated1#Unrelated1(E)\n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "3. ERROR in Test.java (at line 8)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127e() { @@ -1939,77 +1799,37 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(Object)\n" + - " ^^^\n" + - "Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Object)\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(Object)\n" + - " ^^^^^^^^^^^^^^^^^^\n" + - "Javadoc: The constructor Unrelated1(Object) is undefined\n" + - "----------\n" + - "3. ERROR in Test.java (at line 9)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 10)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 11)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 17)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated1#add(Object)\n" + + " ^^^\n" + + "Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Object)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Unrelated1#Unrelated1(Object)\n" + + " ^^^^^^^^^^^^^^^^^^\n" + + "Javadoc: The constructor Unrelated1(Object) is undefined\n" + + "----------\n" + + "3. ERROR in Test.java (at line 9)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127f() { @@ -2044,77 +1864,27 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(Number)\n" + - " ^^^\n" + - "Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Number)\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(Number)\n" + - " ^^^^^^^^^^^^^^^^^^\n" + - "Javadoc: The constructor Unrelated1(Number) is undefined\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 9)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 10)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 14)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 14)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 14)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 15)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 15)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 16)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 8)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in Test.java (at line 14)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in Test.java (at line 14)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n" ); } @@ -2152,77 +1922,37 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(Integer)\n" + - " ^^^\n" + - "Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Integer)\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(Integer)\n" + - " ^^^^^^^^^^^^^^^^^^^\n" + - "Javadoc: The constructor Unrelated1(Integer) is undefined\n" + - "----------\n" + - "3. ERROR in Test.java (at line 9)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 10)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 11)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 16)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 16)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 16)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 17)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 17)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 18)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated1#add(Integer)\n" + + " ^^^\n" + + "Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Integer)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Unrelated1#Unrelated1(Integer)\n" + + " ^^^^^^^^^^^^^^^^^^^\n" + + "Javadoc: The constructor Unrelated1(Integer) is undefined\n" + + "----------\n" + + "3. ERROR in Test.java (at line 9)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 16)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 16)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n" ); } @@ -2260,67 +1990,32 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated2.java (at line 1)\n" + - " public interface Unrelated2 {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated2.java (at line 2)\n" + - " boolean add(E e);\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated2#add(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 10)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in Test.java (at line 11)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in Test.java (at line 12)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 17)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "6. ERROR in Test.java (at line 17)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 17)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "8. ERROR in Test.java (at line 18)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 18)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "10. ERROR in Test.java (at line 19)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated2.java (at line 1)\n" + + " public interface Unrelated2 {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated2#add(T)\n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Unrelated2 is not applicable for the arguments (T)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 10)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in Test.java (at line 17)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 17)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } @@ -3265,71 +2960,51 @@ " */\n" + "class G {}\n" }, - "----------\n" + - "1. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "5. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in test\\X.java (at line 15)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "7. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "9. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "11. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "12. ERROR in test\\X.java (at line 22)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "13. ERROR in test\\X.java (at line 24)\n" + - " class G {}\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in test\\X.java (at line 8)\n" + + " public G foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in test\\X.java (at line 8)\n" + + " public G foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in test\\X.java (at line 8)\n" + + " public G foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in test\\X.java (at line 15)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "5. ERROR in test\\X.java (at line 19)\n" + + " public G foo(Class stuffClass);\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "6. ERROR in test\\X.java (at line 19)\n" + + " public G foo(Class stuffClass);\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "7. ERROR in test\\X.java (at line 19)\n" + + " public G foo(Class stuffClass);\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "8. ERROR in test\\X.java (at line 22)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "9. ERROR in test\\X.java (at line 24)\n" + + " class G {}\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n"); } public void testBug95521b() { @@ -3372,96 +3047,66 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in test\\X.java (at line 6)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "2. ERROR in test\\X.java (at line 9)\n" + - " public X(Class classT) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in test\\X.java (at line 9)\n" + - " public X(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in test\\X.java (at line 9)\n" + - " public X(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in test\\X.java (at line 12)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "6. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "10. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "11. ERROR in test\\X.java (at line 25)\n" + - " public Y(Class classT) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "12. ERROR in test\\X.java (at line 25)\n" + - " public Y(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "13. ERROR in test\\X.java (at line 25)\n" + - " public Y(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "14. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "15. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "16. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "17. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "18. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in test\\X.java (at line 6)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "2. ERROR in test\\X.java (at line 9)\n" + + " public X(Class classT) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in test\\X.java (at line 9)\n" + + " public X(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in test\\X.java (at line 12)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "5. ERROR in test\\X.java (at line 16)\n" + + " public Class foo(Class classT) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "6. ERROR in test\\X.java (at line 16)\n" + + " public Class foo(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "7. ERROR in test\\X.java (at line 16)\n" + + " public Class foo(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "8. ERROR in test\\X.java (at line 25)\n" + + " public Y(Class classT) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "9. ERROR in test\\X.java (at line 25)\n" + + " public Y(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "10. ERROR in test\\X.java (at line 32)\n" + + " public Class foo(Class stuffClass) {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "11. ERROR in test\\X.java (at line 32)\n" + + " public Class foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "12. ERROR in test\\X.java (at line 32)\n" + + " public Class foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } @@ -3522,26 +3167,26 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 1)\n" + - " public class X {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 4)\n" + - " * @see T Variable \n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " * @see F Variable\n" + - " ^\n" + - "Javadoc: F cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in X.java (at line 7)\n" + - " static class Entry {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in X.java (at line 1)\n" + + " public class X {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " * @see T Variable \n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "3. ERROR in X.java (at line 5)\n" + + " * @see F Variable\n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "4. ERROR in X.java (at line 7)\n" + + " static class Entry {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n" ); } @@ -3598,26 +3243,26 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 1)\n" + - " public class X {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 4)\n" + - " * @see T Variable \n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " * @see F Variable\n" + - " ^\n" + - "Javadoc: F cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in X.java (at line 7)\n" + - " class Entry {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in X.java (at line 1)\n" + + " public class X {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " * @see T Variable \n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "3. ERROR in X.java (at line 5)\n" + + " * @see F Variable\n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "4. ERROR in X.java (at line 7)\n" + + " class Entry {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n" ); } @@ -3696,16 +3341,6 @@ " public class Test {\n" + " ^\n" + "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Test.java (at line 7)\n" + - " T field;\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " T foo() { return null; }\n" + - " ^\n" + - "T cannot be resolved to a type\n" + "----------\n"); } Index: src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java,v retrieving revision 1.38 diff -u -r1.38 JavadocTest_1_4.java --- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java 28 Apr 2009 17:17:32 -0000 1.38 +++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java 28 Sep 2010 23:53:32 -0000 @@ -1288,27 +1288,32 @@ " public void foo(int val, Object obj) {}\n" + "}" }, - "----------\n" + - "1. ERROR in X.java (at line 4)\n" + - " * @param Type parameter 2\n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "2. ERROR in X.java (at line 5)\n" + - " * @param Type parameter 2\n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "3. ERROR in X.java (at line 6)\n" + - " * @param Type parameter 1\n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "4. ERROR in X.java (at line 10)\n" + - " public void foo(int val, Object obj) {}\n" + - " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " * @param Type parameter 2\n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "2. ERROR in X.java (at line 5)\n" + + " * @param Type parameter 2\n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "3. ERROR in X.java (at line 6)\n" + + " * @param Type parameter 1\n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "4. ERROR in X.java (at line 10)\n" + + " public void foo(int val, Object obj) {}\n" + + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in X.java (at line 10)\n" + + " public void foo(int val, Object obj) {}\n" + + " ^^^^^^^^^^\n" + + "Exceptions cannot be resolved to a type\n" + + "----------\n" ); } public void test038() { @@ -1438,36 +1443,21 @@ " G(E e) {}\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 2)\n" + - " * @see G#G(Object)\n" + - " ^^^^^^^^^\n" + - "Javadoc: The constructor G(Object) is undefined\n" + - "----------\n" + - "2. ERROR in X.java (at line 3)\n" + - " * @see G#G(Exception)\n" + - " ^^^^^^^^^^^^\n" + - "Javadoc: The constructor G(Exception) is undefined\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " public class X extends G {\n" + - " ^^^^^^^^^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in X.java (at line 6)\n" + - " X(Exception exc) { super(exc);}\n" + - " ^^^^^^^^^^^\n" + - "The constructor G(E) refers to the missing type E\n" + - "----------\n" + - "5. ERROR in X.java (at line 8)\n" + - " class G {\n" + - " ^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "6. ERROR in X.java (at line 9)\n" + - " G(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " * @see G#G(Object)\n" + + " ^^^^^^^^^\n" + + "Javadoc: The constructor G(Object) is undefined\n" + + "----------\n" + + "2. ERROR in X.java (at line 5)\n" + + " public class X extends G {\n" + + " ^^^^^^^^^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in X.java (at line 8)\n" + + " class G {\n" + + " ^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n"); } @@ -1497,31 +1487,31 @@ " public void testCompareTo() {}\n" + "}" }, - "----------\n" + - "1. ERROR in X.java (at line 2)\n" + - " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + - " ^^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 2)\n" + - " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in X.java (at line 2)\n" + - " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in X.java (at line 6)\n" + - " public static > int compareTo(final X first, final X firstPrime)\n" + - " ^^^^^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "5. ERROR in X.java (at line 14)\n" + - " * {@link ComparableUtils#compareTo(Object, Object)}.\n" + - " ^^^^^^^^^\n" + - "Javadoc: The method compareTo(Object, Object, Class) in the type ComparableUtils is not applicable for the arguments (Object, Object)\n" + + "----------\n" + + "1. ERROR in X.java (at line 2)\n" + + " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + + " ^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 2)\n" + + " public static > int compareTo(final Object first, final Object firstPrime, final Class type) throws ClassCastException\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in X.java (at line 6)\n" + + " public static > int compareTo(final X first, final X firstPrime)\n" + + " ^^^^^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. WARNING in X.java (at line 6)\n" + + " public static > int compareTo(final X first, final X firstPrime)\n" + + " ^\n" + + "The type parameter X is hiding the type X\n" + + "----------\n" + + "5. ERROR in X.java (at line 14)\n" + + " * {@link ComparableUtils#compareTo(Object, Object)}.\n" + + " ^^^^^^^^^\n" + + "Javadoc: Bound mismatch: The generic method compareTo(X, X) of type ComparableUtils is not applicable for the arguments (Object, Object). The inferred type Object is not a valid substitute for the bounded parameter >\n" + "----------\n"); } @@ -1560,71 +1550,41 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Test#add(T) \n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see #add(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 4)\n" + - " * @see Test#Test(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in Test.java (at line 5)\n" + - " * @see #Test(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 11)\n" + - " public class Test {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "6. ERROR in Test.java (at line 12)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "7. ERROR in Test.java (at line 13)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "8. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "9. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "10. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "11. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "12. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "13. ERROR in Test.java (at line 20)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Test#add(T) \n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see #add(T)\n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Test is not applicable for the arguments (T)\n" + + "----------\n" + + "3. ERROR in Test.java (at line 4)\n" + + " * @see Test#Test(T)\n" + + " ^^^^^^^\n" + + "Javadoc: The constructor Test(T) is undefined\n" + + "----------\n" + + "4. ERROR in Test.java (at line 5)\n" + + " * @see #Test(T)\n" + + " ^^^^^^^\n" + + "Javadoc: The constructor Test(T) is undefined\n" + + "----------\n" + + "5. ERROR in Test.java (at line 11)\n" + + " public class Test {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "6. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "7. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127b() { @@ -1658,61 +1618,31 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Sub#add(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Sub#Sub(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 11)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 12)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 13)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 18)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 19)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 20)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Sub#add(T)\n" + + " ^^^\n" + + "Javadoc: The method add(Number) in the type Sub is not applicable for the arguments (T)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Sub#Sub(T)\n" + + " ^^^^^^\n" + + "Javadoc: The constructor Sub(T) is undefined\n" + + "----------\n" + + "3. ERROR in Test.java (at line 11)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 18)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127c() { @@ -1743,61 +1673,31 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Sub#add(E) \n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Sub#Sub(E)\n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 9)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 10)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 17)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Sub#add(E) \n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Sub#Sub(E)\n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "3. ERROR in Test.java (at line 8)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127d() { @@ -1833,77 +1733,37 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(E)\n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(E)\n" + - " ^\n" + - "Javadoc: E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 9)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 10)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 17)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated1#add(E)\n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Unrelated1#Unrelated1(E)\n" + + " ^\n" + + "Javadoc: E cannot be resolved to a type\n" + + "----------\n" + + "3. ERROR in Test.java (at line 8)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127e() { @@ -1939,77 +1799,37 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(Object)\n" + - " ^^^\n" + - "Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Object)\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(Object)\n" + - " ^^^^^^^^^^^^^^^^^^\n" + - "Javadoc: The constructor Unrelated1(Object) is undefined\n" + - "----------\n" + - "3. ERROR in Test.java (at line 9)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 10)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 11)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 15)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 16)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 17)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated1#add(Object)\n" + + " ^^^\n" + + "Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Object)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Unrelated1#Unrelated1(Object)\n" + + " ^^^^^^^^^^^^^^^^^^\n" + + "Javadoc: The constructor Unrelated1(Object) is undefined\n" + + "----------\n" + + "3. ERROR in Test.java (at line 9)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 15)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127f() { @@ -2044,77 +1864,27 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(Number)\n" + - " ^^^\n" + - "Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Number)\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(Number)\n" + - " ^^^^^^^^^^^^^^^^^^\n" + - "Javadoc: The constructor Unrelated1(Number) is undefined\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 9)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 10)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 14)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 14)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 14)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 15)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 15)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 16)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 8)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in Test.java (at line 14)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in Test.java (at line 14)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127g() { @@ -2151,77 +1921,37 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated1.java (at line 1)\n" + - " public class Unrelated1 {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated1.java (at line 2)\n" + - " public Unrelated1(E e) {}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Unrelated1.java (at line 3)\n" + - " public boolean add(E e) { return false; }\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated1#add(Integer)\n" + - " ^^^\n" + - "Javadoc: The method add(E) in the type Unrelated1 is not applicable for the arguments (Integer)\n" + - "----------\n" + - "2. ERROR in Test.java (at line 3)\n" + - " * @see Unrelated1#Unrelated1(Integer)\n" + - " ^^^^^^^^^^^^^^^^^^^\n" + - "Javadoc: The constructor Unrelated1(Integer) is undefined\n" + - "----------\n" + - "3. ERROR in Test.java (at line 9)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in Test.java (at line 10)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 11)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in Test.java (at line 16)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 16)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in Test.java (at line 16)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 17)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in Test.java (at line 17)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "11. ERROR in Test.java (at line 18)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated1.java (at line 1)\n" + + " public class Unrelated1 {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated1#add(Integer)\n" + + " ^^^\n" + + "Javadoc: The method add(Number) in the type Unrelated1 is not applicable for the arguments (Integer)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 3)\n" + + " * @see Unrelated1#Unrelated1(Integer)\n" + + " ^^^^^^^^^^^^^^^^^^^\n" + + "Javadoc: The constructor Unrelated1(Integer) is undefined\n" + + "----------\n" + + "3. ERROR in Test.java (at line 9)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 16)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "5. ERROR in Test.java (at line 16)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } public void testBug83127h() { @@ -2258,67 +1988,32 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in Unrelated2.java (at line 1)\n" + - " public interface Unrelated2 {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Unrelated2.java (at line 2)\n" + - " boolean add(E e);\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "----------\n" + - "1. ERROR in Test.java (at line 2)\n" + - " * @see Unrelated2#add(T)\n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "2. ERROR in Test.java (at line 10)\n" + - " public class Test{\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in Test.java (at line 11)\n" + - " Test(T t) {}\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in Test.java (at line 12)\n" + - " public boolean add(T t) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in Test.java (at line 17)\n" + - " class Sub extends Test {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "6. ERROR in Test.java (at line 17)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in Test.java (at line 17)\n" + - " class Sub extends Test {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "8. ERROR in Test.java (at line 18)\n" + - " Sub (E e) {super(null);}\n" + - " ^\n" + - "E cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in Test.java (at line 18)\n" + - " Sub (E e) {super(null);}\n" + - " ^^^^^^^^^^^^\n" + - "The constructor Test(T) refers to the missing type T\n" + - "----------\n" + - "10. ERROR in Test.java (at line 19)\n" + - " public boolean add(E e) {\n" + - " ^\n" + - "E cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in Unrelated2.java (at line 1)\n" + + " public interface Unrelated2 {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "----------\n" + + "1. ERROR in Test.java (at line 2)\n" + + " * @see Unrelated2#add(T)\n" + + " ^^^\n" + + "Javadoc: The method add(Object) in the type Unrelated2 is not applicable for the arguments (T)\n" + + "----------\n" + + "2. ERROR in Test.java (at line 10)\n" + + " public class Test{\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in Test.java (at line 17)\n" + + " class Sub extends Test {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in Test.java (at line 17)\n" + + " class Sub extends Test {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n"); } @@ -2709,71 +2404,51 @@ " */\n" + "class G {}\n" }, - "----------\n" + - "1. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "5. ERROR in test\\X.java (at line 8)\n" + - " public G foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "6. ERROR in test\\X.java (at line 15)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "7. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "9. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "10. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "11. ERROR in test\\X.java (at line 19)\n" + - " public G foo(Class stuffClass);\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "12. ERROR in test\\X.java (at line 22)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "13. ERROR in test\\X.java (at line 24)\n" + - " class G {}\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in test\\X.java (at line 8)\n" + + " public G foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in test\\X.java (at line 8)\n" + + " public G foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in test\\X.java (at line 8)\n" + + " public G foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in test\\X.java (at line 15)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "5. ERROR in test\\X.java (at line 19)\n" + + " public G foo(Class stuffClass);\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "6. ERROR in test\\X.java (at line 19)\n" + + " public G foo(Class stuffClass);\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "7. ERROR in test\\X.java (at line 19)\n" + + " public G foo(Class stuffClass);\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "8. ERROR in test\\X.java (at line 22)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "9. ERROR in test\\X.java (at line 24)\n" + + " class G {}\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n" ); } @@ -2817,96 +2492,66 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in test\\X.java (at line 6)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "2. ERROR in test\\X.java (at line 9)\n" + - " public X(Class classT) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "3. ERROR in test\\X.java (at line 9)\n" + - " public X(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "4. ERROR in test\\X.java (at line 9)\n" + - " public X(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "5. ERROR in test\\X.java (at line 12)\n" + - " * @param \n" + - " ^^^\n" + - "Javadoc: Invalid param tag name\n" + - "----------\n" + - "6. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "7. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "8. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "9. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "10. ERROR in test\\X.java (at line 16)\n" + - " public Class foo(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "11. ERROR in test\\X.java (at line 25)\n" + - " public Y(Class classT) {\n" + - " ^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "12. ERROR in test\\X.java (at line 25)\n" + - " public Y(Class classT) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "13. ERROR in test\\X.java (at line 25)\n" + - " public Y(Class classT) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "14. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^^^^^^^^^^^^^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "15. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "16. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "17. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "Syntax error, parameterized types are only available if source level is 1.5\n" + - "----------\n" + - "18. ERROR in test\\X.java (at line 32)\n" + - " public Class foo(Class stuffClass) {\n" + - " ^\n" + - "T cannot be resolved to a type\n" + + "----------\n" + + "1. ERROR in test\\X.java (at line 6)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "2. ERROR in test\\X.java (at line 9)\n" + + " public X(Class classT) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "3. ERROR in test\\X.java (at line 9)\n" + + " public X(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "4. ERROR in test\\X.java (at line 12)\n" + + " * @param \n" + + " ^^^\n" + + "Javadoc: Invalid param tag name\n" + + "----------\n" + + "5. ERROR in test\\X.java (at line 16)\n" + + " public Class foo(Class classT) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "6. ERROR in test\\X.java (at line 16)\n" + + " public Class foo(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "7. ERROR in test\\X.java (at line 16)\n" + + " public Class foo(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "8. ERROR in test\\X.java (at line 25)\n" + + " public Y(Class classT) {\n" + + " ^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "9. ERROR in test\\X.java (at line 25)\n" + + " public Y(Class classT) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "10. ERROR in test\\X.java (at line 32)\n" + + " public Class foo(Class stuffClass) {\n" + + " ^^^^^^^^^^^^^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "11. ERROR in test\\X.java (at line 32)\n" + + " public Class foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + + "----------\n" + + "12. ERROR in test\\X.java (at line 32)\n" + + " public Class foo(Class stuffClass) {\n" + + " ^\n" + + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n" ); } @@ -3523,26 +3168,26 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 1)\n" + - " public class X {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 4)\n" + - " * @see T Variable \n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " * @see F Variable\n" + - " ^\n" + - "Javadoc: F cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in X.java (at line 7)\n" + - " static class Entry {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in X.java (at line 1)\n" + + " public class X {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " * @see T Variable \n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "3. ERROR in X.java (at line 5)\n" + + " * @see F Variable\n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "4. ERROR in X.java (at line 7)\n" + + " static class Entry {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n" ); } @@ -3599,26 +3244,26 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 1)\n" + - " public class X {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in X.java (at line 4)\n" + - " * @see T Variable \n" + - " ^\n" + - "Javadoc: T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in X.java (at line 5)\n" + - " * @see F Variable\n" + - " ^\n" + - "Javadoc: F cannot be resolved to a type\n" + - "----------\n" + - "4. ERROR in X.java (at line 7)\n" + - " class Entry {\n" + - " ^^^^\n" + - "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "1. ERROR in X.java (at line 1)\n" + + " public class X {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + + "----------\n" + + "2. ERROR in X.java (at line 4)\n" + + " * @see T Variable \n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "3. ERROR in X.java (at line 5)\n" + + " * @see F Variable\n" + + " ^\n" + + "Javadoc: Invalid reference\n" + + "----------\n" + + "4. ERROR in X.java (at line 7)\n" + + " class Entry {\n" + + " ^^^^\n" + + "Syntax error, type parameters are only available if source level is 1.5\n" + "----------\n" ); } @@ -3685,18 +3330,7 @@ " public class Test {\n" + " ^\n" + "Syntax error, type parameters are only available if source level is 1.5\n" + - "----------\n" + - "2. ERROR in Test.java (at line 7)\n" + - " T field;\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" + - "3. ERROR in Test.java (at line 8)\n" + - " T foo() { return null; }\n" + - " ^\n" + - "T cannot be resolved to a type\n" + - "----------\n" - ); + "----------\n"); } /** Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java,v retrieving revision 1.202 diff -u -r1.202 MethodVerifyTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 9 Sep 2010 15:42:19 -0000 1.202 +++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 28 Sep 2010 23:53:50 -0000 @@ -11010,8 +11010,8 @@ "Name clash: The method foo(T) of type Interface has the same erasure as foo(T) of type Base but does not override it\n" + "----------\n"); } -//https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 -public void _test213() { +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 +public void test213() { Map compilerOptions15 = getCompilerOptions(); compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); @@ -11061,4 +11061,55 @@ compilerOptions14, null); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 +public void test213a() { + Map compilerOptions15 = getCompilerOptions(); + compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); + compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); + compilerOptions15.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); + this.runConformTest( + new String[] { + "Y.java", + "public abstract class Y implements I {\n" + + " public final Y foo(Object o, J> j) {\n" + + " return null;\n" + + " }\n" + + " public final void bar(Object o, J j, Y y) {\n" + + " }\n" + + "}", + "I.java", + "public interface I {\n" + + " public S foo(Object o, J> j);\n" + + " public void bar(Object o, J j, S s);\n" + + "}", + "J.java", + "public interface J {}" + }, + "", + null, + true, + null, + compilerOptions15, + null); + + Map compilerOptions14 = getCompilerOptions(); + compilerOptions14.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2); + compilerOptions14.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); + compilerOptions14.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3); + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " public Object foo() {\n" + + " return new Y() {};\n" + + " }\n" + + "}" + }, + "", + null, + false, + null, + compilerOptions14, + null); +} } Index: src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java,v retrieving revision 1.35 diff -u -r1.35 ProblemTypeAndMethodTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 21 Sep 2010 14:02:56 -0000 1.35 +++ src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 28 Sep 2010 23:54:08 -0000 @@ -3379,52 +3379,57 @@ " ^^^^\n" + "The method bar1() from the type X refers to the missing type Zork\n" + "----------\n" + - "2. ERROR in X.java (at line 6)\n" + + "2. ERROR in X.java (at line 5)\n" + + " bar2();\n" + + " ^^^^\n" + + "The method bar2() from the type X refers to the missing type Zork\n" + + "----------\n" + + "3. ERROR in X.java (at line 6)\n" + " bar3(null);\n" + " ^^^^\n" + "The method bar3(Zork) from the type X refers to the missing type Zork\n" + "----------\n" + - "3. ERROR in X.java (at line 7)\n" + + "4. ERROR in X.java (at line 7)\n" + " bar4(null,null);\n" + " ^^^^\n" + "The method bar4(Zork) from the type X refers to the missing type Zork\n" + "----------\n" + - "4. ERROR in X.java (at line 9)\n" + + "5. ERROR in X.java (at line 9)\n" + " Zork bar1() {}\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + "----------\n" + - "5. ERROR in X.java (at line 9)\n" + + "6. ERROR in X.java (at line 9)\n" + " Zork bar1() {}\n" + " ^^^^^^\n" + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n" + - "6. ERROR in X.java (at line 10)\n" + + "7. ERROR in X.java (at line 10)\n" + " List bar2() {}\n" + " ^^^^\n" + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n" + - "7. ERROR in X.java (at line 10)\n" + + "8. ERROR in X.java (at line 10)\n" + " List bar2() {}\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + "----------\n" + - "8. ERROR in X.java (at line 11)\n" + + "9. ERROR in X.java (at line 11)\n" + " void bar3(Zork z) {}\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + "----------\n" + - "9. ERROR in X.java (at line 11)\n" + + "10. ERROR in X.java (at line 11)\n" + " void bar3(Zork z) {}\n" + " ^^^^^^\n" + "Syntax error, parameterized types are only available if source level is 1.5\n" + "----------\n" + - "10. ERROR in X.java (at line 12)\n" + + "11. ERROR in X.java (at line 12)\n" + " void bar4(Zork z) {}\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + "----------\n" + - "11. ERROR in X.java (at line 12)\n" + + "12. ERROR in X.java (at line 12)\n" + " void bar4(Zork z) {}\n" + " ^^^^^^^^^^^^^\n" + "Syntax error, parameterized types are only available if source level is 1.5\n" + #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/model/CompletionTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java,v retrieving revision 1.227 diff -u -r1.227 CompletionTests.java --- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 25 Sep 2010 06:53:28 -0000 1.227 +++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 28 Sep 2010 23:55:37 -0000 @@ -6697,8 +6697,8 @@ this.wc.codeComplete(cursorLocation, requestor, this.wcOwner); assertResults( - "CompletionInsideGenericClas[POTENTIAL_METHOD_DECLARATION]{CompletionInsideGenericClas, Ltest.CompletionInsideGenericClass;, ()V, CompletionInsideGenericClas, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + - "CompletionInsideGenericClass[TYPE_REF]{CompletionInsideGenericClass, test, Ltest.CompletionInsideGenericClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", + "CompletionInsideGenericClas[POTENTIAL_METHOD_DECLARATION]{CompletionInsideGenericClas, Ltest.CompletionInsideGenericClass;, ()V, CompletionInsideGenericClas, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + + "CompletionInsideGenericClass[TYPE_REF]{CompletionInsideGenericClass, test, Ltest.CompletionInsideGenericClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", requestor.getResults()); } Index: src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java,v retrieving revision 1.156 diff -u -r1.156 ReconcilerTests.java --- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 22 Sep 2010 04:06:19 -0000 1.156 +++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 28 Sep 2010 23:55:47 -0000 @@ -4876,4 +4876,79 @@ deleteProject(project15); } } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 +public void testGenericAPIUsageFromA14Project6() throws CoreException { + IJavaProject project14 = null; + IJavaProject project15 = null; + try { + project15 = createJavaProject("Reconciler15API", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin"); + createFolder("/Reconciler15API/src/p2"); + createFile( + "/Reconciler15API/src/p2/Y.java", + "package p2;\n" + + "public abstract class Y implements I {\n" + + " public final Y foo(Object o, J j) {\n" + + " return null;\n" + + " }\n" + + " public final void bar(Object o, J j, Y y) {\n" + + " }\n" + + "}\n" + + "interface I {\n" + + " public S foo(Object o, J j);\n" + + " public void bar(Object o, J j, S s);\n" + + "}\n" + + "interface J {}\n" + ); + project15.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); + project15.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); + project15.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); + + project14 = createJavaProject("Reconciler1415", new String[] {"src"}, new String[] {"JCL_LIB"}, "bin"); + project14.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4); + project14.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); + project14.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4); + + IClasspathEntry[] oldClasspath = project14.getRawClasspath(); + int oldLength = oldClasspath.length; + IClasspathEntry[] newClasspath = new IClasspathEntry[oldLength+1]; + System.arraycopy(oldClasspath, 0, newClasspath, 0, oldLength); + newClasspath[oldLength] = JavaCore.newProjectEntry(new Path("/Reconciler15API")); + project14.setRawClasspath(newClasspath, null); + + createFolder("/Reconciler1415/src/p1"); + String source = + "package p1;\n" + + "import p2.Y;\n" + + "public class X {\n" + + " private int unused = 0;\n" + + " public Object foo() {\n" + + " return new Y() {};\n" + + " }\n" + + "}"; + + createFile( + "/Reconciler1415/src/p1/X.java", + source + ); + + this.workingCopies = new ICompilationUnit[1]; + char[] sourceChars = source.toCharArray(); + this.problemRequestor.initialize(sourceChars); + this.workingCopies[0] = getCompilationUnit("/Reconciler1415/src/p1/X.java").getWorkingCopy(this.wcOwner, null); + assertProblems( + "Unexpected problems", + "----------\n" + + "1. WARNING in /Reconciler1415/src/p1/X.java (at line 4)\n" + + " private int unused = 0;\n" + + " ^^^^^^\n" + + "The field X.unused is never read locally\n" + + "----------\n" + ); + } finally { + if (project14 != null) + deleteProject(project14); + if (project15 != null) + deleteProject(project15); + } +} }