You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Formatter formatter = new Formatter();
String result = formatter.formatSource(
"/*\n" +
" * my comment */");
System.out.println(result); // prints only "/*" (is the same for javadoc comments)
Seems like there is a problem if there is no \n after the first comment. If there is one (or any other valid source code) it works fine. It also seems to only effect the very first comment (or set of comments, if there is nothing else in between) in the file. Any further comment is printed as expected, even if there is no newline after it.
The text was updated successfully, but these errors were encountered:
Seems like there is a problem if there is no
\n
after the first comment. If there is one (or any other valid source code) it works fine. It also seems to only effect the very first comment (or set of comments, if there is nothing else in between) in the file. Any further comment is printed as expected, even if there is no newline after it.The text was updated successfully, but these errors were encountered: