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 24384 Details for
Bug 101283
[1.5][javadoc] Javadoc validation raises missing implementation in compiler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Complete patch to fix this issue
v01.txt (text/plain), 10.07 KB, created by
Frederic Fusier
on 2005-07-06 11:59:51 EDT
(
hide
)
Description:
Complete patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2005-07-06 11:59:51 EDT
Size:
10.07 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v >retrieving revision 1.150.2.2 >diff -u -r1.150.2.2 IProblem.java >--- compiler/org/eclipse/jdt/core/compiler/IProblem.java 5 Jul 2005 14:57:48 -0000 1.150.2.2 >+++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 6 Jul 2005 14:27:55 -0000 >@@ -851,6 +851,8 @@ > int JavadocInvalidParamTagName = Javadoc + Internal + 519; > /** @since 3.1 */ > int JavadocInvalidParamTagTypeParameter = Javadoc + Internal + 469; >+ /** @since 3.1 */ >+ int JavadocNonStaticTypeFromStaticInvocation = Javadoc + Internal + 468; > > /** > * Generics >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java,v >retrieving revision 1.33 >diff -u -r1.33 Javadoc.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 17 May 2005 17:18:17 -0000 1.33 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java 6 Jul 2005 14:27:56 -0000 >@@ -270,6 +270,12 @@ > scope.problemReporter().javadocInvalidValueReference(alloc.sourceStart, alloc.sourceEnd, modifiers); > } > } >+ >+ // Verify that there's no type variable reference >+ // (javadoc does not accept them and this is not a referenced bug or requested enhancement) >+ if (reference.resolvedType != null && reference.resolvedType.isTypeVariable()) { >+ scope.problemReporter().javadocInvalidReference(reference.sourceStart, reference.sourceEnd); >+ } > } > > /* >@@ -402,14 +408,15 @@ > if (paramBindind.isTypeVariable()) { > // Verify duplicated tags > boolean duplicate = false; >- for (int j = 0; j < maxBindings && !duplicate; j++) { >+ for (int j = 0; j < i && !duplicate; j++) { > if (bindings[j] == param.resolvedType) { > scope.problemReporter().javadocDuplicatedParamTag(param.token, param.sourceStart, param.sourceEnd, modifiers); > duplicate = true; > } > } > if (!duplicate) { >- bindings[maxBindings++] = (TypeVariableBinding) param.resolvedType; >+ bindings[i] = (TypeVariableBinding) param.resolvedType; >+ maxBindings++; > } > } else { > scope.problemReporter().javadocUndeclaredParamTagName(param.token, param.sourceStart, param.sourceEnd, modifiers); >@@ -418,19 +425,26 @@ > } > > // Look for undocumented type parameters >- if (reportMissing) { >- for (int i = 0; i < typeParametersLength; i++) { >- TypeParameter parameter = parameters[i]; >- boolean found = false; >- for (int j = 0; j < maxBindings && !found; j++) { >- if (parameter.binding == bindings[j]) { >- found = true; >- } >- } >- if (!found) { >- scope.problemReporter().javadocMissingParamTag(parameter.name, parameter.sourceStart, parameter.sourceEnd, modifiers); >+ for (int i = 0; i < typeParametersLength; i++) { >+ TypeParameter parameter = parameters[i]; >+ boolean found = false; >+ for (int j = 0; j < paramTypeParamLength && !found; j++) { >+ if (parameter.binding == bindings[j]) { >+ found = true; >+ bindings[j] = null; > } > } >+ if (!found && reportMissing) { >+ scope.problemReporter().javadocMissingParamTag(parameter.name, parameter.sourceStart, parameter.sourceEnd, modifiers); >+ } >+ } >+ >+ // Report invalid param >+ for (int i=0; i<paramTypeParamLength; i++) { >+ if (bindings[i] != null) { >+ JavadocSingleTypeReference param = this.paramTypeParameters[i]; >+ scope.problemReporter().javadocUndeclaredParamTagName(param.token, param.sourceStart, param.sourceEnd, modifiers); >+ } > } > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java,v >retrieving revision 1.15.2.2 >diff -u -r1.15.2.2 JavadocFieldReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 30 Jun 2005 14:16:31 -0000 1.15.2.2 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java 6 Jul 2005 14:27:56 -0000 >@@ -65,7 +65,8 @@ > fieldBinding = closestMatch; // ignore problem if can reach target field through it > } > } >- } >+ } >+ // When there's no valid field binding, try to resolve possible method reference without parenthesis > if (!fieldBinding.isValidBinding() || !(fieldBinding instanceof FieldBinding)) { > if (this.receiverType instanceof ReferenceBinding) { > ReferenceBinding refBinding = (ReferenceBinding) this.receiverType; >@@ -75,12 +76,15 @@ > } else { > switch (methodBindings.length) { > case 0: >+ // no method was found: report problem > scope.problemReporter().javadocInvalidField(this.sourceStart, this.sourceEnd, fieldBinding, this.receiverType, scope.getDeclarationModifiers()); > break; > case 1: >+ // one method binding was found: store binding in specific field > this.methodBinding = methodBindings[0]; > break; > default: >+ // several method binding were found: store first binding in specific field and report ambiguous error > this.methodBinding = methodBindings[0]; > scope.problemReporter().javadocAmbiguousMethodReference(this.sourceStart, this.sourceEnd, fieldBinding, scope.getDeclarationModifiers()); > break; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java,v >retrieving revision 1.15 >diff -u -r1.15 JavadocSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java 23 Apr 2005 22:20:02 -0000 1.15 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java 6 Jul 2005 14:27:56 -0000 >@@ -63,6 +63,13 @@ > if (binding instanceof PackageBinding) { > this.packageBinding = (PackageBinding) binding; > } else { >+ if (this.resolvedType.problemId() == ProblemReasons.NonStaticReferenceInStaticContext) { >+ ReferenceBinding closestMatch = ((ProblemReferenceBinding)this.resolvedType).closestMatch; >+ if (closestMatch != null && closestMatch.isTypeVariable()) { >+ this.resolvedType = closestMatch; // ignore problem as we want report specific javadoc one instead >+ return resolvedType; >+ } >+ } > reportInvalidType(scope); > } > return null; >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.252.2.3 >diff -u -r1.252.2.3 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 1 Jul 2005 14:17:30 -0000 1.252.2.3 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 6 Jul 2005 14:28:00 -0000 >@@ -585,6 +585,7 @@ > case IProblem.JavadocInheritedMethodHidesEnclosingName: > case IProblem.JavadocInheritedFieldHidesEnclosingName: > case IProblem.JavadocInheritedNameHidesEnclosingTypeName: >+ case IProblem.JavadocNonStaticTypeFromStaticInvocation: > case IProblem.JavadocGenericMethodTypeArgumentMismatch: > case IProblem.JavadocNonGenericMethod: > case IProblem.JavadocIncorrectArityForParameterizedMethod: >@@ -1426,6 +1427,7 @@ > case IProblem.JavadocInheritedMethodHidesEnclosingName: > case IProblem.JavadocInheritedFieldHidesEnclosingName: > case IProblem.JavadocInheritedNameHidesEnclosingTypeName: >+ case IProblem.JavadocNonStaticTypeFromStaticInvocation: > case IProblem.JavadocGenericMethodTypeArgumentMismatch: > case IProblem.JavadocNonGenericMethod: > case IProblem.JavadocIncorrectArityForParameterizedMethod: >@@ -3441,9 +3443,6 @@ > case Ambiguous : > id = IProblem.JavadocAmbiguousField; > break; >- case InheritedNameHidesEnclosingName : >- id = IProblem.JavadocInheritedFieldHidesEnclosingName; >- break; > case NoError : // 0 > default : > needImplementation(); // want to fail to see why we were here... >@@ -3506,9 +3505,6 @@ > case Ambiguous : > id = IProblem.JavadocAmbiguousMethod; > break; >- case InheritedNameHidesEnclosingName : >- id = IProblem.JavadocInheritedMethodHidesEnclosingName; >- break; > case ParameterBoundMismatch : > problemMethod = (ProblemMethodBinding) method; > ParameterizedGenericMethodBinding substitutedMethod = (ParameterizedGenericMethodBinding) problemMethod.closestMatch; >@@ -3674,6 +3670,9 @@ > case InheritedNameHidesEnclosingName : > id = IProblem.JavadocInheritedNameHidesEnclosingTypeName; > break; >+ case NonStaticReferenceInStaticContext : >+ id = IProblem.JavadocNonStaticTypeFromStaticInvocation; >+ break; > case NoError : // 0 > default : > needImplementation(); // want to fail to see why we were here... >Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v >retrieving revision 1.178.2.2 >diff -u -r1.178.2.2 messages.properties >--- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 30 Jun 2005 14:16:31 -0000 1.178.2.2 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 6 Jul 2005 14:28:01 -0000 >@@ -359,6 +359,7 @@ > 460 = Empty block should be documented > > ### DOC >+468 = Cannot make a static reference to the non-static type variable {0} > 469 = Invalid param tag type parameter name > 470 = Unexpected tag > 471 = Missing tag for parameter {0}
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 101283
:
23791
| 24384 |
24385