mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[java-inspection] RedundantStringOperationInspection: fix test
GitOrigin-RevId: 7e3d6b028b954284046502313e425b8cedf0b37e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
42bdd316a7
commit
a71e14445a
@@ -1,18 +1,21 @@
|
||||
// "Use 'isBlank()' and remove redundant 'strip()' call" "true"
|
||||
// "Fix all 'Redundant String operation' problems in file" "true"
|
||||
class X {
|
||||
boolean testStrip(String s) {
|
||||
return s.isBlank();
|
||||
}
|
||||
|
||||
boolean testStripLeading(String s) {
|
||||
return s.stripLeading().isEmpty();
|
||||
return s.isBlank();
|
||||
}
|
||||
|
||||
boolean testStripTrailing(String s) {
|
||||
return s.stripTrailing().isEmpty();
|
||||
return s.isBlank();
|
||||
}
|
||||
|
||||
boolean testStripWithComments(String s) {
|
||||
return s./*1*/strip/*2*/(/*3*/)/*4*/./*5*/isEmpty/*6*/(/*7*/)/*8*/;
|
||||
/*1*/
|
||||
/*2*/
|
||||
/*3*/
|
||||
return s/*4*/./*5*/isBlank/*6*/(/*7*/)/*8*/;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Use 'isBlank()' and remove redundant 'strip()' call" "true"
|
||||
// "Fix all 'Redundant String operation' problems in file" "true"
|
||||
class X {
|
||||
boolean testStrip(String s) {
|
||||
return s.st<caret>rip().isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user