Bug 9101 - Parse error while typing in Java editor
Summary: Parse error while typing in Java editor
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux-Motif
: P1 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-05 10:50 EST by Jared Burns CLA
Modified: 2002-02-07 12:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2002-02-05 10:50:19 EST
20020129++

I got the following exception dumped to the console from my host while working
in a Java editor (just editing JavaDoc when it happened).

java.lang.ArrayStoreException
	at java.lang.System.arraycopy(Native Method)
	at
org.eclipse.jdt.internal.compiler.parser.Parser.consumeMethodHeaderThrowsClause(Parser.java(Compiled
Code))
	at
org.eclipse.jdt.internal.compiler.parser.RecoveredMethod.updateFromParserState(RecoveredMethod.java:297)
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java(Compiled Code))
	at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java(Compiled Code))
	at
org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:968)
	at
org.eclipse.jdt.internal.core.CompilationUnit.generateInfos(CompilationUnit.java:207)
	at org.eclipse.jdt.internal.core.Openable.buildStructure(Openable.java(Compiled
Code))
	at
org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:481)
	at org.eclipse.jdt.internal.core.WorkingCopy.reconcile(WorkingCopy.java:240)
	at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:39)
	at
org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:51)
	at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:66)
	at
org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:153)
Comment 1 Jared Burns CLA 2002-02-05 10:51:25 EST
Actually, it's happening quite a lot and I don't even need to type anything to
make it occur. If I just click around in my editor I get this exception every
few clicks.
Comment 2 Jared Burns CLA 2002-02-05 10:57:31 EST
A little more info:
I was adding API to an interface (IJavaBreakpoint), when this started happening.
I'd pasted the following code into the editor from the Bug report I was working
on so that I could read it as I added the appropriate method declarations. When
I finished the declarations and commented out this text, the problem went away:

"- public void addThreadFilter(IJavaThread thread) - restricts breakpoint to 
given thread and any other previously specified threads
- public void removeThreadFilter(IJavaThread thread)- removes the given thread 
restriction (will need to re-create breakpoint request as JDI does not support 
the removal of thread filters)
- public IJavaThread[] getThreadFilters() - return the set of threads this 
breakpoint is currently restricted to"

With this text in the editor (uncommented), I kept receiving the exception
above. It turns out that I didn't have to do anything at all. Just having the
editor open would cause the exception to be thrown occasionally. I was also
unable to save the editor while this text remained.
Comment 3 Philipe Mulet CLA 2002-02-07 12:42:08 EST
Fixed, was mistaken by the "(will need" which got parsed and recovered as a 
method argument.