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 181923 Details for
Bug 328775
[compiler] Compiler fails to warn about invalid cast when using J2SE 1.4 compiler settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch
reverse324850.txt (text/plain), 163.30 KB, created by
Jay Arthanareeswaran
on 2010-10-28 07:54:42 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-10-28 07:54:42 EDT
Size:
163.30 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.68 >diff -u -r1.68 Javadoc.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 20 Oct 2010 05:46:47 -0000 1.68 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 28 Oct 2010 11:43:26 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 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,8 +570,6 @@ > > // 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.61 >diff -u -r1.61 ParameterizedQualifiedTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 20 Oct 2010 05:46:47 -0000 1.61 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java 28 Oct 2010 11:43:26 -0000 >@@ -229,7 +229,7 @@ > > TypeVariableBinding[] typeVariables = currentOriginal.typeVariables(); > if (typeVariables == Binding.NO_TYPE_VARIABLES) { // check generic >- if (scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_5) { // below 1.5, already reported as syntax error >+ if (scope.compilerOptions().sourceLevel >= 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.52 >diff -u -r1.52 ParameterizedSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 20 Oct 2010 05:46:47 -0000 1.52 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 28 Oct 2010 11:43:26 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 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().originalSourceLevel >= ClassFileConstants.JDK1_5; >+ boolean isCompliant15 = scope.compilerOptions().sourceLevel >= 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.125 >diff -u -r1.125 BinaryTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 20 Oct 2010 05:46:47 -0000 1.125 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 28 Oct 2010 11:43:26 -0000 >@@ -149,12 +149,7 @@ > this.fPackage = packageBinding; > this.fileName = binaryType.getFileName(); > >- /* 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(); >+ char[] typeSignature = environment.globalOptions.originalSourceLevel >= ClassFileConstants.JDK1_5 ? binaryType.getGenericSignature() : null; > 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; >@@ -266,14 +261,11 @@ > } > > long sourceLevel = this.environment.globalOptions.originalSourceLevel; >- /* 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[] typeSignature = null; >+ if (sourceLevel >= ClassFileConstants.JDK1_5) { >+ typeSignature = binaryType.getGenericSignature(); >+ this.tagBits |= binaryType.getTagBits(); >+ } > char[][][] missingTypeNames = binaryType.getMissingTypeNames(); > if (typeSignature == null) { > char[] superclassName = binaryType.getSuperclassName(); >@@ -420,12 +412,7 @@ > TypeBinding returnType = null; > > final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5; >- /* 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 >+ char[] methodSignature = use15specifics ? method.getGenericSignature() : null; > if (methodSignature == null) { // no generics > char[] methodDescriptor = method.getMethodDescriptor(); // of the form (I[Ljava/jang/String;)V > int numOfParams = 0; >@@ -489,7 +476,7 @@ > } else { > methodModifiers |= ExtraCompilerModifiers.AccGenericSignature; > // MethodTypeSignature = ParameterPart(optional) '(' TypeSignatures ')' return_typeSignature ['^' TypeSignature (optional)] >- SignatureWrapper wrapper = new SignatureWrapper(methodSignature, use15specifics); >+ SignatureWrapper wrapper = new SignatureWrapper(methodSignature); > 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.181 >diff -u -r1.181 ClassScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 20 Oct 2010 05:46:47 -0000 1.181 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java 28 Oct 2010 11:43:27 -0000 >@@ -384,8 +384,9 @@ > > SourceTypeBinding sourceType = this.referenceContext.binding; > TypeParameter[] typeParameters = this.referenceContext.typeParameters; >- // 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) { >+ >+ // do not construct type variables if source < 1.5 >+ if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) { > 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.107 >diff -u -r1.107 LookupEnvironment.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 20 Oct 2010 05:46:47 -0000 1.107 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java 28 Oct 2010 11:43:27 -0000 >@@ -1322,12 +1322,9 @@ > } > > public MethodVerifier newMethodVerifier() { >- /* 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); >+ return this.globalOptions.sourceLevel < ClassFileConstants.JDK1_5 >+ ? new MethodVerifier(this) >+ : new MethodVerifier15(this); // covariance only if sourceLevel is >= 1.5 > } > > 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.76 >diff -u -r1.76 MethodScope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java 20 Oct 2010 05:46:47 -0000 1.76 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java 28 Oct 2010 11:43:27 -0000 >@@ -329,8 +329,8 @@ > } > > TypeParameter[] typeParameters = method.typeParameters(); >- // 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) { >+ // do not construct type variables if source < 1.5 >+ if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) { > 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.117 >diff -u -r1.117 MethodVerifier15.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 22 Oct 2010 04:26:50 -0000 1.117 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 28 Oct 2010 11:43:27 -0000 >@@ -11,7 +11,6 @@ > 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; > >@@ -81,11 +80,7 @@ > } > boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two) { > if (one.returnType == two.returnType) return true; >- if (this.type.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { >- return areReturnTypesCompatible0(one, two); >- } else { >- return areTypesEqual(one.returnType.erasure(), two.returnType.erasure()); >- } >+ return areReturnTypesCompatible0(one, two); > } > 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.115 >diff -u -r1.115 ParameterizedTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 20 Oct 2010 05:46:47 -0000 1.115 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 28 Oct 2010 11:43:28 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2010 IBM Corporation and others. >+ * Copyright (c) 2005, 2009 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,7 +15,6 @@ > 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, >@@ -861,9 +860,7 @@ > // arity check > TypeVariableBinding[] refTypeVariables = resolvedType.typeVariables(); > if (refTypeVariables == Binding.NO_TYPE_VARIABLES) { // check generic >- // 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) { >+ if ((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.42 >diff -u -r1.42 RawTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java 20 Oct 2010 05:46:47 -0000 1.42 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java 28 Oct 2010 11:43:28 -0000 >@@ -126,7 +126,7 @@ > } > > public boolean isEquivalentTo(TypeBinding otherType) { >- if (this == otherType || erasure() == otherType) >+ if (this == 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.374 >diff -u -r1.374 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 20 Oct 2010 05:46:47 -0000 1.374 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 28 Oct 2010 11:43:28 -0000 >@@ -704,8 +704,8 @@ > } > > public TypeVariableBinding[] createTypeVariables(TypeParameter[] typeParameters, Binding declaringElement) { >- // 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) >+ // do not construct type variables if source < 1.5 >+ if (typeParameters == null || compilerOptions().sourceLevel < ClassFileConstants.JDK1_5) > 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.9 >diff -u -r1.9 SignatureWrapper.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java 20 Oct 2010 05:46:47 -0000 1.9 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/SignatureWrapper.java 28 Oct 2010 11:43:28 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2009 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,16 +17,11 @@ > public int start; > public int end; > public int bracket; >- private boolean use15specifics; > >- public SignatureWrapper(char[] signature, boolean use15specifics) { >+ public SignatureWrapper(char[] signature) { > 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; >@@ -51,33 +46,9 @@ > this.end = this.start; > } > >- if (this.use15specifics || this.end != this.bracket) { >- this.start = this.end + 1; // skip ';' >- } else { >- this.start = skipAngleContents(this.end) + 1; // skip <<>*>; >- this.bracket = -1; >- } >+ this.start = this.end + 1; // skip ';' > 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.423 >diff -u -r1.423 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 20 Oct 2010 05:46:48 -0000 1.423 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 28 Oct 2010 11:43:29 -0000 >@@ -1850,7 +1850,6 @@ > 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( >@@ -7084,9 +7083,6 @@ > } > } > 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.69 >diff -u -r1.69 SourceTypeConverter.java >--- model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 20 Oct 2010 05:46:47 -0000 1.69 >+++ model/org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter.java 28 Oct 2010 11:43:29 -0000 >@@ -291,22 +291,21 @@ > int start = methodInfo.getNameSourceStart(); > int end = methodInfo.getNameSourceEnd(); > >- /* 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 >- */ >+ // convert 1.5 specific constructs only if compliance is 1.5 or above > TypeParameter[] typeParams = null; >- 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); >+ // 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); >+ } > } > } > } >@@ -466,24 +465,24 @@ > /* convert annotations */ > type.annotations = convertAnnotations(typeHandle); > } >- /* 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); >+ // 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); >+ } > } > } > > /* set superclass and superinterfaces */ > if (typeInfo.getSuperclassName() != null) { >- type.superclass = createTypeReference(typeInfo.getSuperclassName(), start, end, true /* include generics */); >+ type.superclass = createTypeReference(typeInfo.getSuperclassName(), start, end); > type.superclass.bits |= ASTNode.IsSuperType; > } > char[][] interfaceNames = typeInfo.getInterfaceNames(); >@@ -491,7 +490,7 @@ > if (interfaceCount > 0) { > type.superInterfaces = new TypeReference[interfaceCount]; > for (int i = 0; i < interfaceCount; i++) { >- type.superInterfaces[i] = createTypeReference(interfaceNames[i], start, end, true /* include generics */); >+ type.superInterfaces[i] = createTypeReference(interfaceNames[i], start, end); > 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.7 >diff -u -r1.7 TypeConverter.java >--- model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java 20 Oct 2010 05:46:47 -0000 1.7 >+++ model/org/eclipse/jdt/internal/compiler/parser/TypeConverter.java 28 Oct 2010 11:43:29 -0000 >@@ -107,25 +107,11 @@ > 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, false); >+ return decodeType(typeName, length, start, end); > } > > /* >@@ -365,7 +351,7 @@ > } > } > >- private TypeReference decodeType(char[] typeName, int length, int start, int end, boolean includeGenericsAnyway) { >+ private TypeReference decodeType(char[] typeName, int length, int start, int end) { > int identCount = 1; > int dim = 0; > int nameFragmentStart = this.namePos, nameFragmentEnd = -1; >@@ -387,7 +373,7 @@ > } > this.namePos += max; > Wildcard result = new Wildcard(Wildcard.SUPER); >- result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway); >+ result.bound = decodeType(typeName, length, start, end); > result.sourceStart = start; > result.sourceEnd = end; > return result; >@@ -403,7 +389,7 @@ > } > this.namePos += max; > Wildcard result = new Wildcard(Wildcard.EXTENDS); >- result.bound = decodeType(typeName, length, start, end, includeGenericsAnyway); >+ result.bound = decodeType(typeName, length, start, end); > result.sourceStart = start; > result.sourceEnd = end; > return result; >@@ -428,27 +414,23 @@ > identCount ++; > break; > case '<' : >- /* 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 >+ /* 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 > to this problem. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=325633 > */ >- if (this.has1_5Compliance || includeGenericsAnyway) { >+ if (this.has1_5Compliance) { > if (fragments == null) fragments = new ArrayList(2); > } > nameFragmentEnd = this.namePos-1; >- if (this.has1_5Compliance || includeGenericsAnyway) { >+ if (this.has1_5Compliance) { > char[][] identifiers = CharOperation.splitOn('.', typeName, nameFragmentStart, this.namePos); > fragments.add(identifiers); > } > this.namePos++; // skip '<' >- TypeReference[] arguments = decodeTypeArguments(typeName, length, start, end, includeGenericsAnyway); // positionned on '>' at end >- if (this.has1_5Compliance || includeGenericsAnyway) { >+ TypeReference[] arguments = decodeTypeArguments(typeName, length, start, end); // positionned on '>' at end >+ if (this.has1_5Compliance) { > fragments.add(arguments); > identCount = 0; > nameFragmentStart = -1; >@@ -537,11 +519,11 @@ > } > } > >- private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end, boolean includeGenericsAnyway) { >+ private TypeReference[] decodeTypeArguments(char[] typeName, int length, int start, int end) { > ArrayList argumentList = new ArrayList(1); > int count = 0; > argumentsLoop: while (this.namePos < length) { >- TypeReference argument = decodeType(typeName, length, start, end, includeGenericsAnyway); >+ TypeReference argument = decodeType(typeName, length, start, end); > 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.43 >diff -u -r1.43 ComplianceDiagnoseTest.java >--- src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 20 Oct 2010 05:47:03 -0000 1.43 >+++ src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java 28 Oct 2010 11:43:32 -0000 >@@ -1446,16 +1446,11 @@ > }; > > 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" + >- "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" + >+ "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"; > String expected14ProblemLog = > expected13ProblemLog; >@@ -2016,26 +2011,31 @@ > }; > > 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 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" + >+ "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"; > 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.36 >diff -u -r1.36 JavadocTest_1_3.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java 20 Oct 2010 05:47:03 -0000 1.36 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java 28 Oct 2010 11:43:32 -0000 >@@ -1287,32 +1287,27 @@ > " 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" + >- "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" >+ "----------\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" > ); > } > public void test038() { >@@ -1442,21 +1437,36 @@ > " 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 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" + >+ "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" > ); > } >@@ -1487,31 +1497,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 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" + >+ "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"); > } > >@@ -1550,41 +1560,71 @@ > " }\n" + > "}\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" + >+ "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"); > } > public void testBug83127b() { >@@ -1618,31 +1658,61 @@ > " }\n" + > "}\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" + >+ "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"); > } > public void testBug83127c() { >@@ -1673,31 +1743,61 @@ > " }\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 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" + >+ "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"); > } > public void testBug83127d() { >@@ -1733,37 +1833,77 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > public void testBug83127e() { >@@ -1799,37 +1939,77 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > public void testBug83127f() { >@@ -1864,27 +2044,77 @@ > " }\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" + >- "----------\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" + >+ "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" > ); > } >@@ -1922,37 +2152,77 @@ > " }\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" + >- "----------\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" + >+ "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" > ); > } >@@ -1990,32 +2260,67 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > >@@ -2960,51 +3265,71 @@ > " */\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" + >- "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" + >+ "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"); > } > public void testBug95521b() { >@@ -3047,66 +3372,96 @@ > " }\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 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" + >+ "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"); > } > >@@ -3167,26 +3522,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: 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" + >+ "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" > ); > } >@@ -3243,26 +3598,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: 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" + >+ "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" > ); > } >@@ -3341,6 +3696,16 @@ > " 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.39 >diff -u -r1.39 JavadocTest_1_4.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java 20 Oct 2010 05:47:03 -0000 1.39 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java 28 Oct 2010 11:43:32 -0000 >@@ -1288,32 +1288,27 @@ > " 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" + >- "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" >+ "----------\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" > ); > } > public void test038() { >@@ -1443,21 +1438,36 @@ > " 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 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" + >+ "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"); > } > >@@ -1487,31 +1497,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 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" + >+ "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"); > } > >@@ -1550,41 +1560,71 @@ > " }\n" + > "}\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" + >+ "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"); > } > public void testBug83127b() { >@@ -1618,31 +1658,61 @@ > " }\n" + > "}\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" + >+ "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"); > } > public void testBug83127c() { >@@ -1673,31 +1743,61 @@ > " }\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 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" + >+ "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"); > } > public void testBug83127d() { >@@ -1733,37 +1833,77 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > public void testBug83127e() { >@@ -1799,37 +1939,77 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > public void testBug83127f() { >@@ -1864,27 +2044,77 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > public void testBug83127g() { >@@ -1921,37 +2151,77 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > public void testBug83127h() { >@@ -1988,32 +2258,67 @@ > " }\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" + >- "----------\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" + >+ "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"); > } > >@@ -2404,51 +2709,71 @@ > " */\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" + >- "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" + >+ "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" > ); > } >@@ -2492,66 +2817,96 @@ > " }\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 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" + >+ "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" > ); > } >@@ -3168,26 +3523,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: 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" + >+ "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" > ); > } >@@ -3244,26 +3599,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: 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" + >+ "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" > ); > } >@@ -3330,7 +3685,18 @@ > " public class Test<T> {\n" + > " ^\n" + > "Syntax error, type parameters are only available if source level is 1.5\n" + >- "----------\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/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.204 >diff -u -r1.204 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 22 Oct 2010 04:25:43 -0000 1.204 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 28 Oct 2010 11:43:34 -0000 >@@ -11011,7 +11011,7 @@ > "----------\n"); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 >-public void test213() { >+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,57 +11061,6 @@ > 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); >-} > public void test326354() { > this.runConformTest( > new String[] { >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.36 >diff -u -r1.36 ProblemTypeAndMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 20 Oct 2010 05:47:03 -0000 1.36 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 28 Oct 2010 11:43:34 -0000 >@@ -3379,57 +3379,52 @@ > " ^^^^\n" + > "The method bar1() from the type X refers to the missing type Zork\n" + > "----------\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" + >+ "2. 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" + >- "4. ERROR in X.java (at line 7)\n" + >+ "3. 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" + >- "5. ERROR in X.java (at line 9)\n" + >+ "4. ERROR in X.java (at line 9)\n" + > " Zork<String> bar1() {}\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + > "----------\n" + >- "6. ERROR in X.java (at line 9)\n" + >+ "5. 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" + >- "7. ERROR in X.java (at line 10)\n" + >+ "6. 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" + >- "8. ERROR in X.java (at line 10)\n" + >+ "7. ERROR in X.java (at line 10)\n" + > " List<Zork> bar2() {}\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + > "----------\n" + >- "9. ERROR in X.java (at line 11)\n" + >+ "8. ERROR in X.java (at line 11)\n" + > " void bar3(Zork<String> z) {}\n" + > " ^^^^\n" + > "Zork cannot be resolved to a type\n" + > "----------\n" + >- "10. ERROR in X.java (at line 11)\n" + >+ "9. 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" + >- "11. ERROR in X.java (at line 12)\n" + >+ "10. 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" + >- "12. 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" + > "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.228 >diff -u -r1.228 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 20 Oct 2010 05:46:56 -0000 1.228 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 28 Oct 2010 11:43:49 -0000 >@@ -6697,8 +6697,8 @@ > this.wc.codeComplete(cursorLocation, requestor, this.wcOwner); > > assertResults( >- "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) + "}", >+ "CompletionInsideGenericClas[POTENTIAL_METHOD_DECLARATION]{CompletionInsideGenericClas, Ltest.CompletionInsideGenericClass;, ()V, CompletionInsideGenericClas, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}\n" + >+ "CompletionInsideGenericClass[TYPE_REF]{CompletionInsideGenericClass, test, Ltest.CompletionInsideGenericClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}", > requestor.getResults()); > } > >Index: src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java,v >retrieving revision 1.158 >diff -u -r1.158 ReconcilerTests.java >--- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 23 Oct 2010 00:18:36 -0000 1.158 >+++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 28 Oct 2010 11:43:49 -0000 >@@ -4876,273 +4876,4 @@ > 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 value of the field X.unused is not used\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 328775
:
181779
| 181923 |
181936
|
182019