Fix end-of-line comment handling

GitOrigin-RevId: f982435cd3a1659b0a1be1970cd5807419f16ccd
This commit is contained in:
Tagir Valeev
2020-06-03 09:09:48 +03:00
committed by intellij-monorepo-bot
parent b74b7c8ef2
commit 69a085809a
3 changed files with 34 additions and 4 deletions
@@ -0,0 +1,12 @@
// "Replace with anyMatch()" "true"
import java.util.List;
class X {
String test(List<String> list) {
if (list.stream().map(String::trim).anyMatch(String::isEmpty)) {
return null; // Comment
}
System.out.println("hello");
return "foo";
}
}
@@ -0,0 +1,15 @@
// "Replace with anyMatch()" "true"
import java.util.List;
class X {
String test(List<String> list) {
for (String s : li<caret>st) {
String s1 = s.trim();
if (s1.isEmpty()) {
return null; // Comment
}
}
System.out.println("hello");
return "foo";
}
}