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 58122 Details for
Bug 138897
Error ranges for unreachable code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_138897.txt (text/plain), 1.47 KB, created by
Olivier Thomann
on 2007-02-02 11:08:00 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-02-02 11:08:00 EST
Size:
1.47 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >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.338 >diff -u -r1.338 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 31 Jan 2007 19:31:44 -0000 1.338 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 2 Feb 2007 16:08:29 -0000 >@@ -6086,12 +6086,22 @@ > location.sourceEnd); > } > public void unreachableCode(Statement statement) { >+ int sourceStart = statement.sourceStart; >+ int sourceEnd = statement.sourceEnd; >+ if (statement instanceof LocalDeclaration) { >+ LocalDeclaration declaration = (LocalDeclaration) statement; >+ sourceStart = declaration.declarationSourceStart; >+ sourceEnd = declaration.declarationSourceEnd; >+ } else if (statement instanceof Expression) { >+ int statemendEnd = ((Expression) statement).statementEnd; >+ if (statemendEnd != -1) sourceEnd = statemendEnd; >+ } > this.handle( > IProblem.CodeCannotBeReached, > NoArgument, > NoArgument, >- statement.sourceStart, >- statement.sourceEnd); >+ sourceStart, >+ sourceEnd); > } > public void unresolvableReference(NameReference nameRef, Binding binding) { > /* also need to check that the searchedType is the receiver type
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 138897
:
58122
|
58560