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 204192 Details for
Bug 241834
[search] ClassCastException during move class refactoring
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch + test
patch.txt (text/plain), 2.43 KB, created by
Satyam Kandula
on 2011-09-28 09:59:48 EDT
(
hide
)
Description:
Patch + test
Filename:
MIME Type:
Creator:
Satyam Kandula
Created:
2011-09-28 09:59:48 EDT
Size:
2.43 KB
patch
obsolete
>diff --git src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >index 8bd6b74..3b4ba2e 100644 >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java >@@ -711,6 +711,7 @@ > suite.addTest(new JavaSearchBugsTests("testBug349683")); > suite.addTest(new JavaSearchBugsTests("testBug345807")); > suite.addTest(new JavaSearchBugsTests("testBug355605")); >+ suite.addTest(new JavaSearchBugsTests("testBug241834")); > return suite; > } > class TestCollector extends JavaSearchResultCollector { >@@ -13748,8 +13749,34 @@ > search(method, IMPLEMENTORS, EXACT_RULE, hierarchyScope, this.resultCollector); > assertSearchResults("Unexpected search results!", "X.java void X$R.t:<anonymous>#1.s:<anonymous>#1.myMethod() [myMethod] EXACT_MATCH", this.resultCollector); > >+ } finally { >+ deleteProject("P"); >+ } >+} >+/** >+ * @bug 241834: [search] ClassCastException during move class refactoring >+ * @test that search for declarations of referenced types doesn't cause CCE >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=241834" >+ */ >+public void testBug241834() throws CoreException { >+ try { >+ IJavaProject project = createJavaProject("P"); >+ project.setOption(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, JavaCore.ENABLED); >+ createFolder("/P/pkg"); >+ createFile("/P/pkg/Foo.java", >+ "package pkg;\n"+ >+ "/**\n" + >+ " * {@link missing.Foo}\n" + >+ " */\n" + >+ "public class Foo {\n" + >+ "}\n"); >+ waitUntilIndexesReady(); >+ IType type = getCompilationUnit("/P/pkg/Foo.java").getType("Foo"); >+ searchDeclarationsOfReferencedTypes(type, this.resultCollector); >+ assertSearchResults(""); > } finally { > deleteProject("P"); >+ > } > } > } >\ No newline at end of file >diff --git search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >index 93f987e..7cfeb7c 100644 >--- search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >+++ search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java >@@ -1351,7 +1351,7 @@ > } > //*/ > protected IType lookupType(ReferenceBinding typeBinding) { >- if (typeBinding == null) return null; >+ if (typeBinding == null || !typeBinding.isValidBinding()) return null; > > char[] packageName = typeBinding.qualifiedPackageName(); > IPackageFragment[] pkgs = this.nameLookup.findPackageFragments(
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 241834
: 204192