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 66705 Details for
Bug 185129
NPE in LocalVariableBinding.computeUniqueKey
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_185129.txt (text/plain), 2.31 KB, created by
Olivier Thomann
on 2007-05-10 12:06:58 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-05-10 12:06:58 EDT
Size:
2.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java,v >retrieving revision 1.39 >diff -u -r1.39 LocalVariableBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java 27 Apr 2007 15:51:38 -0000 1.39 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java 10 May 2007 16:06:12 -0000 >@@ -65,23 +65,24 @@ > > // declaring method or type > BlockScope scope = this.declaringScope; >- MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope(); >- ReferenceContext referenceContext = methodScope.referenceContext; >- if (referenceContext instanceof AbstractMethodDeclaration) { >- MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding; >- if (methodBinding != null) { >- buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/)); >- } >- } else if (referenceContext instanceof TypeDeclaration) { >- TypeBinding typeBinding = ((TypeDeclaration) referenceContext).binding; >- if (typeBinding != null) { >- buffer.append(typeBinding.computeUniqueKey(false/*not a leaf*/)); >+ if (scope != null) { >+ MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope(); >+ ReferenceContext referenceContext = methodScope.referenceContext; >+ if (referenceContext instanceof AbstractMethodDeclaration) { >+ MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding; >+ if (methodBinding != null) { >+ buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/)); >+ } >+ } else if (referenceContext instanceof TypeDeclaration) { >+ TypeBinding typeBinding = ((TypeDeclaration) referenceContext).binding; >+ if (typeBinding != null) { >+ buffer.append(typeBinding.computeUniqueKey(false/*not a leaf*/)); >+ } > } >+ >+ // scope index >+ getScopeKey(scope, buffer); > } >- >- // scope index >- getScopeKey(scope, buffer); >- > // variable name > buffer.append('#'); > buffer.append(this.name);
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 185129
:
66705
|
66863
|
66864