Community
Participate
Working Groups
I am not particulary sure if this is a bug so apologies if it is not and I have wasted your time. Using Eclipse 2.0 Build 200210181211 and JDT 2.1.0. While compiling a file with a syntax error -missing semicolon- I get the following error. java.lang.Error: Unresolved compilation problem: Syntax error on token "data", ";" expected However, the error is attributed to the next line of code not the one that is at fault. ==Code Snippet== String storeStatement = new String("csv") data.put("Poll Question 1"); ==Code Snippet== Obviously,when compiling from command line the error is reported properly: WebServiceClient.java:37: ';' expected String storeStatement = new String("csv") Thank you.
You have a syntax error, because "data" in encountered instead of ";". Therefore we report properly (IMHO) the problem saying that "data" was found instead of ";". You could have both statements on the same line or you can have several blank lines before the semi-colon. It would still be valid code.
I see, however, since the problem originated from the lack of a semi-colon, would it not be easier to the untrained eye, to actually highlight the line that is the root of the problem, and report what was expected as normal? :)
We report an unexpected token at the offending token location. Closing, we won't change this.
Closing