Bug 24403

Summary: ArrayOutOfBoundsException in JavaCore.create(IFile)
Product: [Eclipse Project] JDT Reporter: Unknown User <unknown>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.2   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Unknown User CLA 2002-10-04 13:07:09 EDT
The code:

else if(resource instanceof IFile){
    IFile file= (IFile)resource;
    IJavaElement element= JavaCore.create(file);

The filename is .classpath

This should return null but instead an ArrayOutOfBoundsExceptionIsThrown.

I tracked the exception to:
class: org.eclipse.jdt.internal.compiler.parser.Scanner
method: getNextToken()
line: if (((currentCharacter = source[currentPosition++]) == '\\')

>20020924. JRT.
Comment 1 Olivier Thomann CLA 2002-10-04 14:44:20 EDT
Would you have the complete stack trace?
Comment 2 Unknown User CLA 2002-10-07 05:36:07 EDT
Hmmmm. I cleaned up my workspace a bit and since have been unable to reproduce 
the error. Since you catch all OutOfBoundsExceptions I must have toyed with 
something I shouldn't have. Works now at any rate. Am invalidating PR.
JRT.