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 127307 Details for
Bug 252442
[Search] NPE after move followed by undo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 3.24 KB, created by
Frederic Fusier
on 2009-03-03 07:06:20 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2009-03-03 07:06:20 EST
Size:
3.24 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java,v >retrieving revision 1.322 >diff -u -r1.322 MatchLocator.java >--- search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 23 Feb 2009 17:04:34 -0000 1.322 >+++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java 2 Mar 2009 17:34:46 -0000 >@@ -2157,13 +2157,17 @@ > int length = nodes.length; > for (int i = 0; i < length; i++) { > Integer level = (Integer) nodeSet.matchingNodes.removeKey(nodes[i]); >- this.patternLocator.matchReportReference(nodes[i], enclosingElement, declarationVisitor.getLocalElement(i), declarationVisitor.getOtherElements(i), method.binding, level.intValue(), this); >+ if (level != null) { // ensure that the reference has not been already reported while visiting >+ this.patternLocator.matchReportReference(nodes[i], enclosingElement, declarationVisitor.getLocalElement(i), declarationVisitor.getOtherElements(i), method.binding, level.intValue(), this); >+ } > } > } else { > for (int i = 0, l = nodes.length; i < l; i++) { > ASTNode node = nodes[i]; > Integer level = (Integer) nodeSet.matchingNodes.removeKey(node); >- this.patternLocator.matchReportReference(node, enclosingElement, null, null, method.binding, level.intValue(), this); >+ if (level != null) { // ensure that the reference has not been already reported while visiting >+ this.patternLocator.matchReportReference(node, enclosingElement, null, null, method.binding, level.intValue(), this); >+ } > } > } > return; >@@ -2452,14 +2456,16 @@ > for (int i = 0; i < length; i++) { > ASTNode node = nodes[i]; > Integer level = (Integer) nodeSet.matchingNodes.removeKey(node); >- if (node instanceof TypeDeclaration) { >- // use field declaration to report match (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=88174) >- AllocationExpression allocation = ((TypeDeclaration)node).allocation; >- if (allocation != null && allocation.enumConstant != null) { >- node = field; >+ if (level != null) { // ensure that the reference has not been already reported while visiting >+ if (node instanceof TypeDeclaration) { >+ // use field declaration to report match (see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=88174) >+ AllocationExpression allocation = ((TypeDeclaration)node).allocation; >+ if (allocation != null && allocation.enumConstant != null) { >+ node = field; >+ } > } >+ this.patternLocator.matchReportReference(node, enclosingElement, declarationVisitor.getLocalElement(i), declarationVisitor.getOtherElements(i), field.binding, level.intValue(), this); > } >- this.patternLocator.matchReportReference(node, enclosingElement, declarationVisitor.getLocalElement(i), declarationVisitor.getOtherElements(i), field.binding, level.intValue(), this); > } > return; > }
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 252442
: 127307