Bug 96448 - Scanner.getCurrentTokenSourceString NegativeArraySizeException
Summary: Scanner.getCurrentTokenSourceString NegativeArraySizeException
Status: RESOLVED DUPLICATE of bug 90414
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-24 11:35 EDT by Ron Gavlin CLA
Modified: 2005-05-24 14:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Gavlin CLA 2005-05-24 11:35:09 EDT
Eclipse 3.1M6.

Adding the following line of code to any Java source file breaks code completion.

private static String BAD = "\"";

OTOH, adding a leading character to the string contents as follows fixes the
problem.

private static String OK = "x\"";

Here's the .log report:

!MESSAGE The command for the key you pressed failed
!STACK 0
java.lang.NegativeArraySizeException
   at
org.eclipse.jdt.internal.compiler.parser.Scanner.getCurrentTokenSourceString(Scanner.java:501)
   at org.eclipse.jdt.internal.compiler.parser.Parser.consumeToken(Parser.java:6793)
   at
org.eclipse.internal.codeassist.impl.AssistParser.consumeToken(AssistParser.java:666)
   at
org.eclipse.internal.codeassist.complete.CompletionParser.consumeToken(CompletionParser.java:2235)
...
Comment 1 Olivier Thomann CLA 2005-05-24 14:46:54 EDT

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