Community
Participate
Working Groups
Open a Scrapbook page. Write any valid statement, add a // comment at the end of the line. Example: System.out.println("example\n"); // this is a comment Select the line from "System" to "comment", right click and Run. You get a compile error saying 'Syntax error on token ";", "Unexpected End Of File" expected'. If you replace the // comment by a /* */ comment, it compiles correctly. If you include the newline at the end of the selected text (put the cursor to the left of "System", press Shift+End, press Shift+RightArrow), it also compiles correctly. All the same, it is weird that including a comment in the selection causes a compilation error.
*** This bug has been marked as a duplicate of 14626 ***
Re-opened (thanks bugzilla, not a dup)
This appears to be a problem in the JDT Core. We're passing the snippet in and getting a call back to the acceptProblem() method. I have a theory about what's happening here, but I don't know the JDT Core code well enough to verify it. Could it be that we're generating source which looks like this? public void run() { <insert snippet> } If so, the above test case would result in the following erroneous source: public void run() { System.out.println("Foo"); //}
You suspected well. Fixed and released in HEAD.
I tried to verify the fix on build 20020502 under Win2k. It is NOT working correctly. Which build will get the fix incorporated?
It is only going to be released into the next tuesday's integration build.