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 83417 Details for
Bug 210427
[compiler] Missing syntax error on invalid annotation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Possible Patch
210427.txt (text/plain), 9.81 KB, created by
Philipe Mulet
on 2007-11-21 05:47:57 EST
(
hide
)
Description:
Possible Patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2007-11-21 05:47:57 EST
Size:
9.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java,v >retrieving revision 1.379 >diff -u -r1.379 Parser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 6 Nov 2007 08:39:27 -0000 1.379 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java 21 Nov 2007 10:45:06 -0000 >@@ -9239,9 +9239,6 @@ > > if (DEBUG) System.out.println("-- EXIT FROM PARSE METHOD --"); //$NON-NLS-1$ > } >-public void parse(ConstructorDeclaration cd, CompilationUnitDeclaration unit) { >- parse(cd, unit, false); >-} > public void parse(ConstructorDeclaration cd, CompilationUnitDeclaration unit, boolean recordLineSeparator) { > //only parse the method body of cd > //fill out its statements >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java,v >retrieving revision 1.91 >diff -u -r1.91 ConstructorDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 9 Oct 2007 15:59:28 -0000 1.91 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 21 Nov 2007 10:45:03 -0000 >@@ -382,15 +382,13 @@ > > public void parseStatements(Parser parser, CompilationUnitDeclaration unit) { > //fill up the constructor body with its statements >- if (this.ignoreFurtherInvestigation) >- return; > if (((this.bits & ASTNode.IsDefaultConstructor) != 0) && this.constructorCall == null){ > this.constructorCall = SuperReference.implicitSuperConstructorCall(); > this.constructorCall.sourceStart = this.sourceStart; > this.constructorCall.sourceEnd = this.sourceEnd; > return; > } >- parser.parse(this, unit); >+ parser.parse(this, unit, false); > > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java,v >retrieving revision 1.95 >diff -u -r1.95 AbstractMethodDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 9 Oct 2007 15:59:28 -0000 1.95 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java 21 Nov 2007 10:45:03 -0000 >@@ -320,9 +320,7 @@ > * @param parser > * @param unit > */ >- public abstract void parseStatements( >- Parser parser, >- CompilationUnitDeclaration unit); >+ public abstract void parseStatements(Parser parser, CompilationUnitDeclaration unit); > > public StringBuffer print(int tab, StringBuffer output) { > >@@ -446,7 +444,6 @@ > } > > public void tagAsHavingErrors() { >- > this.ignoreFurtherInvestigation = true; > } > >Index: compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java,v >retrieving revision 1.62 >diff -u -r1.62 MethodDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 20 Sep 2007 08:33:32 -0000 1.62 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 21 Nov 2007 10:45:03 -0000 >@@ -45,34 +45,34 @@ > FlowInfo flowInfo) { > > // starting of the code analysis for methods >- if (ignoreFurtherInvestigation) >+ if (this.ignoreFurtherInvestigation) > return; > try { >- if (binding == null) >+ if (this.binding == null) > return; > > if (!this.binding.isUsed() && > (this.binding.isPrivate() > || (((this.binding.modifiers & (ExtraCompilerModifiers.AccOverriding|ExtraCompilerModifiers.AccImplementing)) == 0) && this.binding.declaringClass.isLocalType()))) { > if (!classScope.referenceCompilationUnit().compilationResult.hasSyntaxError) { >- scope.problemReporter().unusedPrivateMethod(this); >+ this.scope.problemReporter().unusedPrivateMethod(this); > } > } > > // skip enum implicit methods >- if (binding.declaringClass.isEnum() && (this.selector == TypeConstants.VALUES || this.selector == TypeConstants.VALUEOF)) >+ if (this.binding.declaringClass.isEnum() && (this.selector == TypeConstants.VALUES || this.selector == TypeConstants.VALUEOF)) > return; > > // may be in a non necessary <clinit> for innerclass with static final constant fields >- if (binding.isAbstract() || binding.isNative()) >+ if (this.binding.isAbstract() || this.binding.isNative()) > return; > > ExceptionHandlingFlowContext methodContext = > new ExceptionHandlingFlowContext( > initializationContext, > this, >- binding.thrownExceptions, >- scope, >+ this.binding.thrownExceptions, >+ this.scope, > FlowInfo.DEAD_END); > > // tag parameters as being set >@@ -82,65 +82,59 @@ > } > } > // propagate to statements >- if (statements != null) { >+ if (this.statements != null) { > boolean didAlreadyComplain = false; >- for (int i = 0, count = statements.length; i < count; i++) { >- Statement stat = statements[i]; >- if (!stat.complainIfUnreachable(flowInfo, scope, didAlreadyComplain)) { >- flowInfo = stat.analyseCode(scope, methodContext, flowInfo); >+ for (int i = 0, count = this.statements.length; i < count; i++) { >+ Statement stat = this.statements[i]; >+ if (!stat.complainIfUnreachable(flowInfo, this.scope, didAlreadyComplain)) { >+ flowInfo = stat.analyseCode(this.scope, methodContext, flowInfo); > } else { > didAlreadyComplain = true; > } > } > } > // check for missing returning path >- TypeBinding returnTypeBinding = binding.returnType; >+ TypeBinding returnTypeBinding = this.binding.returnType; > if ((returnTypeBinding == TypeBinding.VOID) || isAbstract()) { > if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) { > this.bits |= ASTNode.NeedFreeReturn; > } > } else { > if (flowInfo != FlowInfo.DEAD_END) { >- scope.problemReporter().shouldReturn(returnTypeBinding, this); >+ this.scope.problemReporter().shouldReturn(returnTypeBinding, this); > } > } > // check unreachable catch blocks > methodContext.complainIfUnusedExceptionHandlers(this); > // check unused parameters >- scope.checkUnusedParameters(binding); >+ this.scope.checkUnusedParameters(this.binding); > } catch (AbortMethod e) { > this.ignoreFurtherInvestigation = true; > } > } > > public boolean isMethod() { >- > return true; > } > > public void parseStatements(Parser parser, CompilationUnitDeclaration unit) { >- > //fill up the method body with statement >- if (ignoreFurtherInvestigation) >- return; > parser.parse(this, unit); > } > > public StringBuffer printReturnType(int indent, StringBuffer output) { >- >- if (returnType == null) return output; >- return returnType.printExpression(0, output).append(' '); >+ if (this.returnType == null) return output; >+ return this.returnType.printExpression(0, output).append(' '); > } > > public void resolveStatements() { >- > // ========= abort on fatal error ============= > if (this.returnType != null && this.binding != null) { > this.returnType.resolvedType = this.binding.returnType; > // record the return type binding > } > // check if method with constructor name >- if (CharOperation.equals(this.scope.enclosingSourceType().sourceName, selector)) { >+ if (CharOperation.equals(this.scope.enclosingSourceType().sourceName, this.selector)) { > this.scope.problemReporter().methodWithConstructorName(this); > } > >@@ -215,35 +209,35 @@ > > if (visitor.visit(this, classScope)) { > if (this.javadoc != null) { >- this.javadoc.traverse(visitor, scope); >+ this.javadoc.traverse(visitor, this.scope); > } > if (this.annotations != null) { > int annotationsLength = this.annotations.length; > for (int i = 0; i < annotationsLength; i++) >- this.annotations[i].traverse(visitor, scope); >+ this.annotations[i].traverse(visitor, this.scope); > } > if (this.typeParameters != null) { > int typeParametersLength = this.typeParameters.length; > for (int i = 0; i < typeParametersLength; i++) { >- this.typeParameters[i].traverse(visitor, scope); >+ this.typeParameters[i].traverse(visitor, this.scope); > } > } >- if (returnType != null) >- returnType.traverse(visitor, scope); >- if (arguments != null) { >- int argumentLength = arguments.length; >+ if (this.returnType != null) >+ this.returnType.traverse(visitor, this.scope); >+ if (this.arguments != null) { >+ int argumentLength = this.arguments.length; > for (int i = 0; i < argumentLength; i++) >- arguments[i].traverse(visitor, scope); >+ this.arguments[i].traverse(visitor, this.scope); > } >- if (thrownExceptions != null) { >- int thrownExceptionsLength = thrownExceptions.length; >+ if (this.thrownExceptions != null) { >+ int thrownExceptionsLength = this.thrownExceptions.length; > for (int i = 0; i < thrownExceptionsLength; i++) >- thrownExceptions[i].traverse(visitor, scope); >+ this.thrownExceptions[i].traverse(visitor, this.scope); > } >- if (statements != null) { >- int statementsLength = statements.length; >+ if (this.statements != null) { >+ int statementsLength = this.statements.length; > for (int i = 0; i < statementsLength; i++) >- statements[i].traverse(visitor, scope); >+ this.statements[i].traverse(visitor, this.scope); > } > } > visitor.endVisit(this, classScope);
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 210427
: 83417