mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
Java: Don't suggest to extract the trivial method that returns its parameter (IDEA-191899)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
class Node {
|
||||
String getType() { return ""; }
|
||||
|
||||
String foo(Node left, Node right) {
|
||||
String leftType = left.getType();
|
||||
<selection>String rightType = (right.getType());</selection>
|
||||
|
||||
String type = "A";
|
||||
return leftType + rightType + type;
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
class Node {
|
||||
String getType() { return ""; }
|
||||
|
||||
String foo(Node left, Node right) {
|
||||
String leftType = newMethod(left);
|
||||
String rightType = newMethod(right);
|
||||
|
||||
String type = "A";
|
||||
return leftType + rightType + type;
|
||||
}
|
||||
|
||||
private String newMethod(Node right) {
|
||||
return right.getType();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user