Lines 5544-5547
Link Here
|
5544 |
} |
5544 |
} |
5545 |
} |
5545 |
} |
5546 |
|
5546 |
|
|
|
5547 |
/** |
5548 |
* @bug 186410: [dom] StackOverflowError due to endless superclass bindings hierarchy |
5549 |
* @test Ensures that the superclass of "java.lang.Object" class is null even when it's a recovered binding |
5550 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=186410" |
5551 |
*/ |
5552 |
public void test0610() throws CoreException, IOException { |
5553 |
try { |
5554 |
createJavaProject("P", new String[] {""}, new String[0], ""); |
5555 |
createFile("P/A.java", |
5556 |
"public class A {\n" + |
5557 |
" void method(){}\n" + |
5558 |
"}" |
5559 |
); |
5560 |
createFile("P/B.java", |
5561 |
"public class B extends A {\n" + |
5562 |
" void method(){}\n" + |
5563 |
"}" |
5564 |
); |
5565 |
ICompilationUnit cuA = getCompilationUnit("P/A.java"); |
5566 |
CompilationUnit unitA = (CompilationUnit) runConversion(AST.JLS3, cuA, true, false, true); |
5567 |
AbstractTypeDeclaration type = (AbstractTypeDeclaration)unitA.types().get(0); |
5568 |
ITypeBinding typeSuperclass = type.resolveBinding().getSuperclass(); |
5569 |
assertEquals("Unexpected superclass", "Object", typeSuperclass.getName()); |
5570 |
assertNull("java.lang.Object should not have any superclass", typeSuperclass.getSuperclass()); |
5571 |
} finally { |
5572 |
deleteProject("P"); |
5573 |
} |
5574 |
} |
5575 |
|
5547 |
} |
5576 |
} |