File tree Expand file tree Collapse file tree 4 files changed +20
-2
lines changed
main/java/com/google/googlejavaformat/java
java/com/google/googlejavaformat/java
resources/com/google/googlejavaformat/java/testdata Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,9 @@ public boolean isSlashStarComment() {
154154
155155 @ Override
156156 public boolean isJavadocComment () {
157- return text .startsWith ("/**" ) && text .length () > 4 ;
157+ // comments like `/***` are also javadoc, but their formatting probably won't be improved
158+ // by the javadoc formatter
159+ return text .startsWith ("/**" ) && text .charAt ("/**" .length ()) != '*' && text .length () > 4 ;
158160 }
159161
160162 @ Override
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public void empty() {
5050 "class Test {}" ,
5151 };
5252 String [] expected = {
53- "/** */" , "class Test {}" ,
53+ "/***/" , "class Test {}" ,
5454 };
5555 doFormatTest (input , expected );
5656 }
Original file line number Diff line number Diff line change 1+ /*************************************************************************************************************************************************************
2+ * Copyright
3+ *
4+ * Some
5+ *
6+ * Company
7+ *************************************************************************************************************************************************************/
8+ class T {}
Original file line number Diff line number Diff line change 1+ /*************************************************************************************************************************************************************
2+ * Copyright
3+ *
4+ * Some
5+ *
6+ * Company
7+ *************************************************************************************************************************************************************/
8+ class T {}
You can’t perform that action at this time.
0 commit comments