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 82336 Details for
Bug 186410
[dom] StackOverflowError due to endless superclass bindings hierarchy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 2.66 KB, created by
Frederic Fusier
on 2007-11-07 10:11:02 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2007-11-07 10:11:02 EST
Size:
2.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java,v >retrieving revision 1.7 >diff -u -r1.7 RecoveredTypeBinding.java >--- dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java 24 Aug 2007 17:17:34 -0000 1.7 >+++ dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java 7 Nov 2007 14:52:29 -0000 >@@ -244,7 +244,11 @@ > * @see org.eclipse.jdt.core.dom.ITypeBinding#getSuperclass() > */ > public ITypeBinding getSuperclass() { >- return this.resolver.resolveWellKnownType("java.lang.Object"); //$NON-NLS-1$ >+ ITypeBinding object = this.resolver.resolveWellKnownType("java.lang.Object"); //$NON-NLS-1$ >+ if (this == object) { >+ return null; >+ } >+ return object; > } > > /* (non-Javadoc) >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java,v >retrieving revision 1.184 >diff -u -r1.184 ASTConverterTest2.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 24 Sep 2007 11:39:33 -0000 1.184 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java 7 Nov 2007 14:52:37 -0000 >@@ -5544,4 +5544,33 @@ > } > } > >+ /** >+ * @bug 186410: [dom] StackOverflowError due to endless superclass bindings hierarchy >+ * @test Ensures that the superclass of "java.lang.Object" class is null even when it's a recovered binding >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=186410" >+ */ >+ public void test0610() throws CoreException, IOException { >+ try { >+ createJavaProject("P", new String[] {""}, new String[0], ""); >+ createFile("P/A.java", >+ "public class A {\n" + >+ " void method(){}\n" + >+ "}" >+ ); >+ createFile("P/B.java", >+ "public class B extends A {\n" + >+ " void method(){}\n" + >+ "}" >+ ); >+ ICompilationUnit cuA = getCompilationUnit("P/A.java"); >+ CompilationUnit unitA = (CompilationUnit) runConversion(AST.JLS3, cuA, true, false, true); >+ AbstractTypeDeclaration type = (AbstractTypeDeclaration)unitA.types().get(0); >+ ITypeBinding typeSuperclass = type.resolveBinding().getSuperclass(); >+ assertEquals("Unexpected superclass", "Object", typeSuperclass.getName()); >+ assertNull("java.lang.Object should not have any superclass", typeSuperclass.getSuperclass()); >+ } finally { >+ deleteProject("P"); >+ } >+ } >+ > }
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 186410
:
82336
|
82427
|
82455
|
82466
|
82472
|
82754