Bug 295206 - StringIndexOutOfBounds Exception on type hierarchy
Summary: StringIndexOutOfBounds Exception on type hierarchy
Status: CLOSED DUPLICATE of bug 288698
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.6 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 04:12 EST by Vijay Raj CLA
Modified: 2009-11-16 09:51 EST (History)
4 users (show)

See Also:


Attachments
Project for reproducing the bug (4.21 KB, application/x-zip-compressed)
2009-11-16 04:15 EST, Vijay Raj CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vijay Raj CLA 2009-11-16 04:12:34 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Build Identifier: M20090211-1700

If the project is named like *.class* the type hierarchy throws  StringIndexOutOfBounds Exception in eclipse for some cases.

Attached is a project for which this exception occurs,


Reproducible: Always

Steps to Reproduce:
1.Import the attached project into workspace.
2.Select IFilter class in package explorer and open Type Hierarchy
3.StringIndexOutOfBounds Exception is thrown.
Comment 1 Vijay Raj CLA 2009-11-16 04:15:01 EST
Created attachment 152269 [details]
Project for reproducing the bug
Comment 2 Vijay Raj CLA 2009-11-16 04:48:38 EST
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5)
> Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
> Build Identifier: M20090211-1700
> 
> If the project is named like *.class* the type hierarchy throws 
> StringIndexOutOfBounds Exception in eclipse for some cases.
> 
> Attached is a project for which this exception occurs,
> 
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1.Import the attached project into workspace.
> 2.Select IFilter class in package explorer and open Type Hierarchy
> 3.StringIndexOutOfBounds Exception is thrown.

Stack trace for the above

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -53
	at java.lang.String.substring(String.java:1949)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder$2.acceptIndexMatch(IndexBasedHierarchyBuilder.java:475)
	at org.eclipse.jdt.internal.core.search.matching.InternalSearchPattern.acceptMatch(InternalSearchPattern.java:57)
	at org.eclipse.jdt.internal.core.search.matching.InternalSearchPattern.findIndexMatches(InternalSearchPattern.java:88)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.findIndexMatches(MatchLocator.java:269)
	at org.eclipse.jdt.internal.core.search.PatternSearchJob.search(PatternSearchJob.java:97)
	at org.eclipse.jdt.internal.core.search.SubTypeSearchJob.search(SubTypeSearchJob.java:44)
	at org.eclipse.jdt.internal.core.search.PatternSearchJob.execute(PatternSearchJob.java:63)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob(JobManager.java:276)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.searchAllPossibleSubTypes(IndexBasedHierarchyBuilder.java:523)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.determinePossibleSubTypes(IndexBasedHierarchyBuilder.java:406)
	at org.eclipse.jdt.internal.core.hierarchy.IndexBasedHierarchyBuilder.build(IndexBasedHierarchyBuilder.java:120)
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.compute(TypeHierarchy.java:300)
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1241)
	at org.eclipse.jdt.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:90)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:716)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:777)
	at org.eclipse.jdt.internal.core.SourceType.newTypeHierarchy(SourceType.java:749)
	at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.createTypeHierarchy(TypeHierarchyLifeCycle.java:118)
	at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle.doHierarchyRefresh(TypeHierarchyLifeCycle.java:157)
	at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyLifeCycle$1.run(TypeHierarchyLifeCycle.java:98)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 3 Stephan Herrmann CLA 2009-11-16 06:49:02 EST
This looks like an exact duplicate of bug 288698 which has a patch
released in 3.6 M2.

Do you have a chance to try a recent milestone?
Comment 4 Olivier Thomann CLA 2009-11-16 09:51:02 EST
Closing as a duplicate of bug 288698.
Please reopen if you can reproduce with M2 or M3.

*** This bug has been marked as a duplicate of bug 288698 ***