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 66863 Details for
Bug 185129
NPE in LocalVariableBinding.computeUniqueKey
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch with a comment
patch_185129.txt (text/plain), 2.40 KB, created by
Olivier Thomann
on 2007-05-11 10:48:56 EDT
(
hide
)
Description:
Updated patch with a comment
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-05-11 10:48:56 EDT
Size:
2.40 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 11 May 2007 14:48:12 -0000 >@@ -65,23 +65,25 @@ > > // 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) { >+ // the scope can be null. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=185129 >+ 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