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 82950 Details for
Bug 209222
Stack overflow in TypeHierarchyPerfTest
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
209222.txt (text/plain), 2.96 KB, created by
Jerome Lanneluc
on 2007-11-15 04:37:20 EST
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2007-11-15 04:37:20 EST
Size:
2.96 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java,v >retrieving revision 1.74 >diff -u -r1.74 HierarchyResolver.java >--- model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java 6 Mar 2007 02:38:51 -0000 1.74 >+++ model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java 15 Nov 2007 09:29:45 -0000 >@@ -657,16 +657,8 @@ > } else { > // cache binary type binding > ClassFile classFile = (ClassFile)openable; >- IBinaryType binaryType = null; >- if (classFile.isOpen()) { >- // create binary type from info >- IType type = classFile.getType(); >- try { >- binaryType = (IBinaryType)((JavaElement)type).getElementInfo(); >- } catch (JavaModelException e) { >- // type exists since class file is opened >- } >- } else { >+ IBinaryType binaryType = (IBinaryType) JavaModelManager.getJavaModelManager().getInfo(classFile.getType()); >+ if (binaryType == null) { > // create binary type from file > if (classFile.getPackageFragmentRoot().isArchive()) { > binaryType = this.builder.createInfoFromClassFileInJar(classFile); >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java,v >retrieving revision 1.73 >diff -u -r1.73 TypeHierarchyTests.java >--- src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java 27 Sep 2007 10:30:32 -0000 1.73 >+++ src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java 15 Nov 2007 09:29:47 -0000 >@@ -1275,6 +1275,24 @@ > assertTrue("Unexpected focus type for hierarchy on region", this.typeHierarchy.getType() == null); > } > /* >+ * Ensures that a call to IJavaProject.findType("java.lang.Object") doesn't cause the hierarchy >+ * computation to throw a StackOverFlow >+ * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=209222) >+ */ >+public void testFindObject() throws CoreException { >+ try { >+ IJavaProject p = createJavaProject("P"); >+ // ensure Object.class is closed >+ p.getPackageFragmentRoot(getExternalJCLPathString()).getPackageFragment("java.lang").getClassFile("Object.class").close(); >+ // find Object to fill internal jar type cache >+ IType type = p.findType("java.lang.Object"); >+ // create hierarchy >+ type.newTypeHierarchy(null); // should not throw a StackOverFlow >+ } finally { >+ deleteProject("P"); >+ } >+} >+/* > * Ensures that a hierarchy on an type that implements a binary inner interface is correct. > * (regression test for bug 58440 type hierarchy incomplete when implementing fully qualified interface) > */
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 209222
:
82739
| 82950