Java: fix IOE on replacing single character string operation

GitOrigin-RevId: 26ba697294eebb109148b86672a22e7aa2e921e4
This commit is contained in:
Bas Leijdekkers
2022-08-29 15:14:56 +02:00
committed by intellij-monorepo-bot
parent 26bbaa3c5f
commit e7c55493a1
7 changed files with 64 additions and 65 deletions

View File

@@ -0,0 +1,6 @@
// "Fix all 'Redundant 'String' operation' problems in file" "true"
class X {
void x(String message) {
boolean underline = message.charAt(1) == '_';
}
}

View File

@@ -0,0 +1,7 @@
// "Fix all 'Redundant 'String' operation' problems in file" "true"
class X {
void x(String message) {
boolean underline = message.<caret>substring(1, 2).equals("""
_""");
}
}