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 237670 Details for
Bug 419798
Problem marker with inconsistent data
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]
Uploading the code patch.
Bug-419798--code-patch.patch (text/plain), 3.53 KB, created by
ANIRBAN CHAKRABORTY
on 2013-11-24 10:33:31 EST
(
hide
)
Description:
Uploading the code patch.
Filename:
MIME Type:
Creator:
ANIRBAN CHAKRABORTY
Created:
2013-11-24 10:33:31 EST
Size:
3.53 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java >index ed00510..02e67e9 100644 >--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java >+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java >@@ -82,10 +82,11 @@ > > IrritantSet[] suppressWarningIrritants; // irritant for suppressed warnings > Annotation[] suppressWarningAnnotations; > long[] suppressWarningScopePositions; // (start << 32) + end > int suppressWarningsCount; >+ public ASTNode nodeBeingResolved; > > public CompilationUnitDeclaration(ProblemReporter problemReporter, CompilationResult compilationResult, int sourceLength) { > this.problemReporter = problemReporter; > this.compilationResult = compilationResult; > //by definition of a compilation unit.... >diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java >index 277151b..4aca96c 100644 >--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java >+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java >@@ -316,11 +316,15 @@ > lambda.returnsExpression(null, methodType); > if (methodType != null) scope.problemReporter().shouldReturn(methodType, this); > return; > } > >+ CompilationUnitDeclaration referenceContext = scope.compilationUnitScope().referenceContext; >+ ASTNode oldResolvNode = referenceContext.nodeBeingResolved; >+ referenceContext.nodeBeingResolved = this.expression; > expressionType = this.expression.resolveType(scope); >+ referenceContext.nodeBeingResolved = oldResolvNode; > if (lambda != null) > lambda.returnsExpression(this.expression, expressionType); > > if (expressionType == null) return; > if (expressionType == TypeBinding.VOID) { >diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >index b950a5d..4012432 100644 >--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >@@ -4575,11 +4575,17 @@ > public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location) { > this.referenceContext = compUnitDecl; > String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)}; > int start = 0, end = 0; > if (location != null) { >- if (location instanceof InvocationSite) { >+ ReferenceBinding refBinding; >+ if (compUnitDecl != null && compUnitDecl.nodeBeingResolved != null && >+ location instanceof FieldDeclaration && ((refBinding = ((FieldDeclaration)location).binding.declaringClass).modifiers & ClassFileConstants.AccEnum) != 0 && >+ !(compUnitDecl.getFileName().equals(refBinding instanceof SourceTypeBinding ? ((SourceTypeBinding)refBinding).getFileName(): null))) { >+ start = compUnitDecl.nodeBeingResolved.sourceStart; >+ end = compUnitDecl.nodeBeingResolved.sourceEnd; >+ } else if (location instanceof InvocationSite) { > InvocationSite site = (InvocationSite) location; > start = site.sourceStart(); > end = site.sourceEnd(); > } else if (location instanceof ASTNode) { > ASTNode node = (ASTNode) location;
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 419798
: 237670