mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
RedundantStringOperationInspection: fixes after review IDEA-CR-25339
1. messages cleanup
2. new StringBuilder(""). PrintStream.println("") are warned
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// "Delete element" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'append' call" "true"
|
||||
// "Remove redundant 'append()' call" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Delete element" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder s = new StringBuilder();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'intern' call" "true"
|
||||
// "Remove redundant 'intern()' call" "true"
|
||||
class Foo {
|
||||
private static final String x = ("Hello "+"World"+'!');
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toString' call" "true"
|
||||
// "Remove redundant 'toString()' call" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
/*valuable comment!!!*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toString' call" "false"
|
||||
// "Remove redundant 'toString()' call" "false"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
Object[] a = args;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Delete element" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("<caret>");
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'append' call" "true"
|
||||
// "Remove redundant 'append()' call" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// "Delete element" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
StringBuilder s = new StringBuilder(("<caret>"));
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'intern' call" "true"
|
||||
// "Remove redundant 'intern()' call" "true"
|
||||
class Foo {
|
||||
private static final String x = ("Hello "+"World"+'!').inte<caret>rn();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'intern' call" "false"
|
||||
// "Remove redundant 'intern()' call" "false"
|
||||
class Foo {
|
||||
private static final String x = ("Hello "+"World".trim()+'!').inte<caret>rn();
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'toString' call" "true"
|
||||
// "Remove redundant 'toString()' call" "true"
|
||||
class Foo {
|
||||
public static void main(String[] args) {
|
||||
String s = args[0].toString<caret>(/*valuable comment!!!*/);
|
||||
|
||||
Reference in New Issue
Block a user