Summary: | Compiler error when block-commenting a string that contains '*/' | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Thomas Dudziak <tomdzk> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.0 M7 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Thomas Dudziak
2004-01-16 11:18:06 EST
This behavior is imposed by the language. If you break the string in between * and /, it will be fine. public class Test { public void doSomething() { String text = "This is a block comment end: *"+"/"; } } You're right, the JLS states as much (http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#48125). Of course it's sad that the weak expressivness of the recursive-descent grammar imposes this - in my eyes - useless constraint upon the language. |