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 116431 Details for
Bug 252481
[code assist] NPE in findAllTypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
bu252481_001.txt (text/plain), 2.43 KB, created by
David Audel
on 2008-10-29 11:48:24 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
David Audel
Created:
2008-10-29 11:48:24 EDT
Size:
2.43 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ResolveTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests.java,v >retrieving revision 1.89 >diff -u -r1.89 ResolveTests.java >--- src/org/eclipse/jdt/core/tests/model/ResolveTests.java 27 Jun 2008 16:02:40 -0000 1.89 >+++ src/org/eclipse/jdt/core/tests/model/ResolveTests.java 29 Oct 2008 15:46:42 -0000 >@@ -414,6 +414,25 @@ > ); > } > /** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=252481 >+ */ >+public void testEmptyCU1() throws JavaModelException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy( >+ "/Resolve/src/Test.java", >+ "//this CU must contain only an unknown type name" + >+ "Unknown\n" + >+ "\n" >+ ); >+ >+ IJavaElement[] elements = codeSelect(this.workingCopies[0], "Unknown", "Unknown"); >+ assertElementsEqual( >+ "Unexpected elements", >+ "", >+ elements >+ ); >+} >+/** > * Resolve empty selection > */ > public void testEmptySelection() throws JavaModelException { >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java,v >retrieving revision 1.150 >diff -u -r1.150 SelectionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java 9 Oct 2008 13:15:22 -0000 1.150 >+++ codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java 29 Oct 2008 15:46:51 -0000 >@@ -730,7 +730,11 @@ > > IJavaSearchScope scope = BasicSearchEngine.createWorkspaceScope(); > >- SelectionTypeNameMatchRequestorWrapper requestorWrapper = new SelectionTypeNameMatchRequestorWrapper(typeNameMatchRequestor, scope, this.unitScope.referenceContext.imports); >+ SelectionTypeNameMatchRequestorWrapper requestorWrapper = >+ new SelectionTypeNameMatchRequestorWrapper( >+ typeNameMatchRequestor, >+ scope, >+ this.unitScope == null ? null : this.unitScope.referenceContext.imports); > > org.eclipse.jdt.core.ICompilationUnit[] workingCopies = this.owner == null ? null : JavaModelManager.getJavaModelManager().getWorkingCopies(this.owner, true/*add primary WCs*/); >
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 252481
: 116431