mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: Recognize multiple parametrized duplicates when extracting a method (IDEA-188243)
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
class DeclaredOutputVariable {
|
||||
void foo(String[] a, int j) {
|
||||
<selection>
|
||||
String s = a[j];
|
||||
if (s == null) return;
|
||||
System.out.println(s.charAt(1) + "X");
|
||||
</selection>
|
||||
System.out.println(s.length());
|
||||
}
|
||||
|
||||
void bar(String[] a, int k) {
|
||||
String s = a[k];
|
||||
if (s == null) return;
|
||||
System.out.println(s.charAt(2) + "Y");
|
||||
System.out.println(s.length());
|
||||
}
|
||||
|
||||
void bar(String[] a, int n) {
|
||||
String s = a[n];
|
||||
if (s == null) return;
|
||||
System.out.println(s.charAt(1) + "Z");
|
||||
System.out.println(s.length());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user