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 26240 Details for
Bug 107332
[compiler] wrong problem method generated for unused imports
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]
Proposed fix
patch_107332.txt (text/plain), 1.90 KB, created by
Olivier Thomann
on 2005-08-18 11:51:43 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-08-18 11:51:43 EDT
Size:
1.90 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java,v >retrieving revision 1.18 >diff -u -r1.18 ProblemHandler.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java 6 May 2005 19:18:04 -0000 1.18 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java 18 Aug 2005 15:45:11 -0000 >@@ -89,7 +89,8 @@ > // if no reference context, we need to abort from the current compilation process > if (referenceContext == null) { > if ((severity & Error) != 0) { // non reportable error is fatal >- IProblem problem = this.createProblem(null, problemId, problemArguments, messageArguments, severity, 0, 0, 0); >+ if (problemId == IProblem.UnusedImport) return; >+ IProblem problem = this.createProblem(null, problemId, problemArguments, messageArguments, severity, 0, 0, 0); > throw new AbortCompilation(null, problem); > } else { > return; // ignore non reportable warning >@@ -113,14 +114,17 @@ > switch (severity & Error) { > case Error : > this.record(problem, unitResult, referenceContext); >- referenceContext.tagAsHavingErrors(); >- >- // should abort ? >- int abortLevel; >- if ((abortLevel = >- (this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) { >- >- referenceContext.abort(abortLevel, problem); >+ // we might want to filter other non jls mandatory errors >+ if (problemId != IProblem.UnusedImport) { >+ referenceContext.tagAsHavingErrors(); >+ >+ // should abort ? >+ int abortLevel; >+ if ((abortLevel = >+ (this.policy.stopOnFirstError() ? AbortCompilation : severity & Abort)) != 0) { >+ >+ referenceContext.abort(abortLevel, problem); >+ } > } > break; > case Warning :
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 107332
: 26240