Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 179821 Details for
Bug 324850
Compile error claims method is missing but is inherited
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Revised patch - passes all JDT/Core tests
patch.txt (text/plain), 163.41 KB, created by
Srikanth Sankaran
on 2010-09-29 06:24:06 EDT
(
hide
)
Description:
Revised patch - passes all JDT/Core tests
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2010-09-29 06:24:06 EDT
Size:
163.41 KB
patch
obsolete
>### 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 29 Sep 2010 10:16:43 -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/ast/ParameterizedQualifiedTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java,v >retrieving revision 1.60 >diff -u -r1.60 ParameterizedQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 7 Jan 2010 20:18:49 -0000 1.60 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 29 Sep 2010 10:16:44 -0000 >@@ -229,7 +229,7 @@ > > TypeVariableBinding[] typeVariables = currentOriginal.typeVariables(); > if (typeVariables == Binding.NO_TYPE_VARIABLES) { // check generic >- if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { // below 1.5, already reported as syntax error >+ if (scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_5) { // below 1.5, already reported as syntax error > scope.problemReporter().nonGenericTypeCannotBeParameterized(i, this, currentType, argTypes); > return null; > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java,v >retrieving revision 1.51 >diff -u -r1.51 ParameterizedSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 28 Apr 2009 16:53:03 -0000 1.51 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 29 Sep 2010 10:16:45 -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 >@@ -195,7 +195,7 @@ > > TypeVariableBinding[] typeVariables = currentOriginal.typeVariables(); > if (typeVariables == Binding.NO_TYPE_VARIABLES) { // non generic invoked with arguments >- boolean isCompliant15 = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5; >+ boolean isCompliant15 = scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_5; > if ((currentOriginal.tagBits & TagBits.HasMissingType) == 0) { > if (isCompliant15) { // below 1.5, already reported as syntax error > this.resolvedType = currentType; >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 29 Sep 2010 10:16:50 -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] == '<') { > // <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)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 29 Sep 2010 10:16:54 -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 29 Sep 2010 10:17:00 -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 29 Sep 2010 10:17:03 -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 29 Sep 2010 10:17:08 -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/ParameterizedTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v >retrieving revision 1.114 >diff -u -r1.114 ParameterizedTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 14 May 2009 14:50:31 -0000 1.114 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 29 Sep 2010 10:17:12 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2009 IBM Corporation and others. >+ * Copyright (c) 2005, 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 >@@ -15,6 +15,7 @@ > import org.eclipse.jdt.core.compiler.CharOperation; > import org.eclipse.jdt.internal.compiler.ast.TypeReference; > import org.eclipse.jdt.internal.compiler.ast.Wildcard; >+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > > /** > * A parameterized type encapsulates a type with type arguments, >@@ -860,7 +861,9 @@ > // arity check > TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables(); > if (refTypeVariables == Binding.NO_TYPE_VARIABLES) { // check generic >- if ((resolvedType.tagBits & TagBits.HasMissingType) == 0) { >+ // Below 1.5, we should have already complained about the use of type parameters. >+ boolean isCompliant15 = this.environment.globalOptions.originalSourceLevel >= ClassFileConstants.JDK1_5; >+ if (isCompliant15 && (resolvedType.tagBits & TagBits.HasMissingType) == 0) { > this.environment.problemReporter.nonGenericTypeCannotBeParameterized(0, null, resolvedType, this.arguments); > } > return this; >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java,v >retrieving revision 1.41 >diff -u -r1.41 RawTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java 23 Jun 2010 13:47:01 -0000 1.41 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java 29 Sep 2010 10:17:13 -0000 >@@ -126,7 +126,7 @@ > } > > public boolean isEquivalentTo(TypeBinding otherType) { >- if (this == otherType) >+ if (this == otherType || erasure() == otherType) > return true; > if (otherType == null) > return false; >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 29 Sep 2010 10:17:42 -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 29 Sep 2010 10:17:42 -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 29 Sep 2010 10:18:17 -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 29 Sep 2010 10:18:19 -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 29 Sep 2010 10:18:21 -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 29 Sep 2010 10:18:35 -0000 >@@ -1446,11 +1446,16 @@ > }; > > String expected13ProblemLog = >- "----------\n" + >- "1. ERROR in X.java (at line 1)\n" + >- " public class X <T1 extends String, T2 extends Y {\n" + >- " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >- "Syntax error on token(s), misplaced construct(s)\n" + >+ "----------\n" + >+ "1. ERROR in X.java (at line 1)\n" + >+ " public class X <T1 extends String, T2 extends Y {\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "Syntax error on token(s), misplaced construct(s)\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 1)\n" + >+ " public class X <T1 extends String, T2 extends Y {\n" + >+ " ^\n" + >+ "Y cannot be resolved to a type\n" + > "----------\n"; > String expected14ProblemLog = > expected13ProblemLog; >@@ -2011,31 +2016,26 @@ > }; > > String expected13ProblemLog = >- "----------\n" + >- "1. ERROR in X.java (at line 2)\n" + >- " public <T> 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 <T> 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" + >- " <String>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" + >- " <String>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 <T> 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" + >+ " <String>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" + >+ " <String>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 29 Sep 2010 10:19:14 -0000 >@@ -1287,27 +1287,32 @@ > " public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" + > "}" > }, >- "----------\n" + >- "1. ERROR in X.java (at line 4)\n" + >- " * @param <T> Type parameter 2\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 5)\n" + >- " * @param <V> Type parameter 2\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "3. ERROR in X.java (at line 6)\n" + >- " * @param <U> Type parameter 1\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "4. ERROR in X.java (at line 10)\n" + >- " public <T, U, V extends Exceptions> 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 <T> Type parameter 2\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 5)\n" + >+ " * @param <V> Type parameter 2\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 6)\n" + >+ " * @param <U> Type parameter 1\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "4. ERROR in X.java (at line 10)\n" + >+ " public <T, U, V extends Exceptions> 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 <T, U, V extends Exceptions> 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<Exception> {\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<E extends Exception> {\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<Exception> {\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<E extends Exception> {\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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <X extends Comparable< ? super X>> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <X extends Comparable< ? super X>> 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 <X extends Comparable< ? super X>> 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 <X extends Comparable<? super X>>\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<T> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\n" + >+ " ^\n" + >+ "Syntax error, parameterized types are only available if source level is 1.5\n" + > "----------\n"); > } > >@@ -3265,71 +2960,51 @@ > " */\n" + > "class G<T> {}\n" > }, >- "----------\n" + >- "1. ERROR in test\\X.java (at line 8)\n" + >- " public <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "4. ERROR in test\\X.java (at line 8)\n" + >- " public <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "6. ERROR in test\\X.java (at line 15)\n" + >- " * @param <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "7. ERROR in test\\X.java (at line 19)\n" + >- " public <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> stuffClass);\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "10. ERROR in test\\X.java (at line 19)\n" + >- " public <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> stuffClass);\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "12. ERROR in test\\X.java (at line 22)\n" + >- " * @param <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "13. ERROR in test\\X.java (at line 24)\n" + >- " class G<T> {}\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 <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> 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 <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "5. ERROR in test\\X.java (at line 19)\n" + >+ " public <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> 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 <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "9. ERROR in test\\X.java (at line 24)\n" + >+ " class G<T> {}\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 <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "2. ERROR in test\\X.java (at line 9)\n" + >- " public <T> X(Class<T> 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 <T> X(Class<T> 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 <T> X(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "5. ERROR in test\\X.java (at line 12)\n" + >- " * @param <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "6. ERROR in test\\X.java (at line 16)\n" + >- " public <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "9. ERROR in test\\X.java (at line 16)\n" + >- " public <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "11. ERROR in test\\X.java (at line 25)\n" + >- " public <T> Y(Class<T> 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 <T> Y(Class<T> 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 <T> Y(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "14. ERROR in test\\X.java (at line 32)\n" + >- " public <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "17. ERROR in test\\X.java (at line 32)\n" + >- " public <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >+ "----------\n" + >+ "1. ERROR in test\\X.java (at line 6)\n" + >+ " * @param <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "2. ERROR in test\\X.java (at line 9)\n" + >+ " public <T> X(Class<T> 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 <T> X(Class<T> 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 <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "5. ERROR in test\\X.java (at line 16)\n" + >+ " public <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> 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 <T> Y(Class<T> 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 <T> Y(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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<T, F> {\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<L, R> {\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<T, F> {\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<L, R> {\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<T, F> {\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<L, R> {\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<T, F> {\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<L, R> {\n" + >+ " ^^^^\n" + >+ "Syntax error, type parameters are only available if source level is 1.5\n" + > "----------\n" > ); > } >@@ -3696,16 +3341,6 @@ > " public class Test<T> {\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 29 Sep 2010 10:19:24 -0000 >@@ -1288,27 +1288,32 @@ > " public <T, U, V extends Exceptions> void foo(int val, Object obj) {}\n" + > "}" > }, >- "----------\n" + >- "1. ERROR in X.java (at line 4)\n" + >- " * @param <T> Type parameter 2\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 5)\n" + >- " * @param <V> Type parameter 2\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "3. ERROR in X.java (at line 6)\n" + >- " * @param <U> Type parameter 1\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "4. ERROR in X.java (at line 10)\n" + >- " public <T, U, V extends Exceptions> 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 <T> Type parameter 2\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 5)\n" + >+ " * @param <V> Type parameter 2\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 6)\n" + >+ " * @param <U> Type parameter 1\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "4. ERROR in X.java (at line 10)\n" + >+ " public <T, U, V extends Exceptions> 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 <T, U, V extends Exceptions> 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<Exception> {\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<E extends Exception> {\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<Exception> {\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<E extends Exception> {\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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <X extends Comparable< ? super X>> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <T extends Comparable< ? super T>> int compareTo(final Object first, final Object firstPrime, final Class<T> 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 <X extends Comparable< ? super X>> 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 <X extends Comparable< ? super X>> 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 <X extends Comparable<? super X>>\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<T> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\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<E> {\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<T>{\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<E extends Number> extends Test<E> {\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<E extends Number> extends Test<E> {\n" + >+ " ^\n" + >+ "Syntax error, parameterized types are only available if source level is 1.5\n" + > "----------\n"); > } > >@@ -2709,71 +2404,51 @@ > " */\n" + > "class G<T> {}\n" > }, >- "----------\n" + >- "1. ERROR in test\\X.java (at line 8)\n" + >- " public <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "4. ERROR in test\\X.java (at line 8)\n" + >- " public <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "6. ERROR in test\\X.java (at line 15)\n" + >- " * @param <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "7. ERROR in test\\X.java (at line 19)\n" + >- " public <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> stuffClass);\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "10. ERROR in test\\X.java (at line 19)\n" + >- " public <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> stuffClass);\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "12. ERROR in test\\X.java (at line 22)\n" + >- " * @param <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "13. ERROR in test\\X.java (at line 24)\n" + >- " class G<T> {}\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 <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> 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 <T> G<T> foo(Class<T> 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 <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "5. ERROR in test\\X.java (at line 19)\n" + >+ " public <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> 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 <T extends Object> G<T> foo(Class<T> 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 <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "9. ERROR in test\\X.java (at line 24)\n" + >+ " class G<T> {}\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 <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "2. ERROR in test\\X.java (at line 9)\n" + >- " public <T> X(Class<T> 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 <T> X(Class<T> 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 <T> X(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "5. ERROR in test\\X.java (at line 12)\n" + >- " * @param <T>\n" + >- " ^^^\n" + >- "Javadoc: Invalid param tag name\n" + >- "----------\n" + >- "6. ERROR in test\\X.java (at line 16)\n" + >- " public <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "9. ERROR in test\\X.java (at line 16)\n" + >- " public <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "11. ERROR in test\\X.java (at line 25)\n" + >- " public <T> Y(Class<T> 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 <T> Y(Class<T> 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 <T> Y(Class<T> classT) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "14. ERROR in test\\X.java (at line 32)\n" + >- " public <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >- "----------\n" + >- "17. ERROR in test\\X.java (at line 32)\n" + >- " public <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> stuffClass) {\n" + >- " ^\n" + >- "T cannot be resolved to a type\n" + >+ "----------\n" + >+ "1. ERROR in test\\X.java (at line 6)\n" + >+ " * @param <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "2. ERROR in test\\X.java (at line 9)\n" + >+ " public <T> X(Class<T> 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 <T> X(Class<T> 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 <T>\n" + >+ " ^^^\n" + >+ "Javadoc: Invalid param tag name\n" + >+ "----------\n" + >+ "5. ERROR in test\\X.java (at line 16)\n" + >+ " public <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> 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 <T> Class<T> foo(Class<T> 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 <T> Y(Class<T> 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 <T> Y(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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 <T extends Object> Class<T> foo(Class<T> 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<T, F> {\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<L, R> {\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<T, F> {\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<L, R> {\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<T, F> {\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<L, R> {\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<T, F> {\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<L, R> {\n" + >+ " ^^^^\n" + >+ "Syntax error, type parameters are only available if source level is 1.5\n" + > "----------\n" > ); > } >@@ -3685,18 +3330,7 @@ > " public class Test<T> {\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 29 Sep 2010 10:20:01 -0000 >@@ -11010,8 +11010,8 @@ > "Name clash: The method foo(T) of type Interface<T> has the same erasure as foo(T) of type Base<T> 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<Y> {\n" + >+ " public final Y foo(Object o, J<Y, I<Y>> j) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " public final void bar(Object o, J<Y, String> j, Y y) {\n" + >+ " }\n" + >+ "}", >+ "I.java", >+ "public interface I<S> {\n" + >+ " public S foo(Object o, J<S, I<S>> j);\n" + >+ " public void bar(Object o, J<S, String> j, S s);\n" + >+ "}", >+ "J.java", >+ "public interface J<S, T> {}" >+ }, >+ "", >+ 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 29 Sep 2010 10:20:14 -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<String> 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<String> 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<Zork> 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<Zork> 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<String> 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<String> 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<String,String> 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<String,String> 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 29 Sep 2010 10:21:45 -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<TCompletionInsideGenericClassParameter;>;, ()V, CompletionInsideGenericClas, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + >+ "CompletionInsideGenericClass<CompletionInsideGenericClassParameter>[TYPE_REF]{CompletionInsideGenericClass, test, Ltest.CompletionInsideGenericClass<TCompletionInsideGenericClassParameter;>;, 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 29 Sep 2010 10:22:07 -0000 >@@ -4876,4 +4876,273 @@ > 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<Y> {\n" + >+ " public final Y foo(Object o, J<Y> j) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " public final void bar(Object o, J<Y> j, Y y) {\n" + >+ " }\n" + >+ "}\n" + >+ "interface I<S> {\n" + >+ " public S foo(Object o, J<S> j);\n" + >+ " public void bar(Object o, J<S> j, S s);\n" + >+ "}\n" + >+ "interface J<S> {}\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); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 >+public void testGenericAPIUsageFromA14Project7() throws CoreException, IOException { >+ 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" + >+ "import java.util.List;\n" + >+ "public class Y<T> extends List<T> {\n" + >+ " public static Y<String> getY() {\n" + >+ " return new Y<String>();\n" + >+ " }\n" + >+ "}\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); >+ >+ addLibrary( >+ project15, >+ "libList15.jar", >+ "libList15src.zip", >+ new String[] { >+ "java/util/List.java", >+ "package java.util;\n" + >+ "public class List<T> {\n" + >+ "}" >+ }, >+ 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); >+ >+ addLibrary( >+ project14, >+ "libList14.jar", >+ "libList14src.zip", >+ new String[] { >+ "java/util/List.java", >+ "package java.util;\n" + >+ "public class List {\n" + >+ "}" >+ }, >+ 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 java.util.List;\n" + >+ "import p2.Y;\n" + >+ "public class X {\n" + >+ " private static List getList(boolean test) {\n" + >+ " if (test)\n" + >+ " return new Y();\n" + >+ " else\n" + >+ " return Y.getY();\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 5)\n" + >+ " private static List getList(boolean test) {\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^\n" + >+ "The method getList(boolean) from the type X is never used locally\n" + >+ "----------\n" >+ ); >+ } finally { >+ if (project14 != null) >+ deleteProject(project14); >+ if (project15 != null) >+ deleteProject(project15); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 >+public void testGenericAPIUsageFromA14Project8() throws CoreException, IOException { >+ 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 class Y<T> extends java.util.List<T> {\n" + >+ " public static Y<String> getY() {\n" + >+ " return new Y<String>();\n" + >+ " }\n" + >+ "}\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); >+ >+ addLibrary( >+ project15, >+ "libList15.jar", >+ "libList15src.zip", >+ new String[] { >+ "java/util/List.java", >+ "package java.util;\n" + >+ "public class List<T> {\n" + >+ "}" >+ }, >+ 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); >+ >+ addLibrary( >+ project14, >+ "libList14.jar", >+ "libList14src.zip", >+ new String[] { >+ "java/util/List.java", >+ "package java.util;\n" + >+ "public class List {\n" + >+ "}" >+ }, >+ 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 static java.util.List getList(boolean test) {\n" + >+ " if (test)\n" + >+ " return new Y();\n" + >+ " else\n" + >+ " return Y.getY();\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 static java.util.List getList(boolean test) {\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^\n" + >+ "The method getList(boolean) from the type X is never used locally\n" + >+ "----------\n" >+ ); >+ } finally { >+ if (project14 != null) >+ deleteProject(project14); >+ if (project15 != null) >+ deleteProject(project15); >+ } >+} > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 324850
:
178519
|
178526
|
178543
|
179022
|
179624
|
179799
| 179821