mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-126310 Unnecessary toString() call fix breaks code
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Fix all 'Unnecessary call to 'toString()'' problems in file" "true"
|
||||
public class MyFile {
|
||||
interface UUID {}
|
||||
interface InetAddress {}
|
||||
|
||||
void test(UUID uuid, InetAddress address) {
|
||||
// IDEA-126310
|
||||
String nodeString = uuid.toString() + address;
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix all 'Unnecessary call to 'toString()'' problems in file" "true"
|
||||
class X {
|
||||
void test(Object x) {
|
||||
System.out.println(x);
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Replace with 'this'" "true"
|
||||
class X {
|
||||
void test(Object x) {
|
||||
System.out.println(this);
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Fix all 'Unnecessary call to 'toString()'' problems in file" "true"
|
||||
public class MyFile {
|
||||
interface UUID {}
|
||||
interface InetAddress {}
|
||||
|
||||
void test(UUID uuid, InetAddress address) {
|
||||
// IDEA-126310
|
||||
String nodeString = uuid.toStr<caret>ing() + address.toString();
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix all 'Unnecessary call to 'toString()'' problems in file" "true"
|
||||
class X {
|
||||
void test(Object x) {
|
||||
System.out.println(x.toStri<caret>ng());
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Replace with 'this'" "true"
|
||||
class X {
|
||||
void test(Object x) {
|
||||
System.out.println(toStri<caret>ng());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user