mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
convert anonymous to inner: collapse diamonds (IDEA-87265)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = new MyPredicate<T>();
|
||||
Predicate<T> predicate = new MyPredicate<>();
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = ne<caret>w Predicate<T>() {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
public class Foo {
|
||||
public<T> void foo() {
|
||||
Predicate<T> predicate = new MyPredicate<>();
|
||||
}
|
||||
|
||||
private interface Predicate<K> {
|
||||
boolean test(K t);
|
||||
}
|
||||
|
||||
private static class MyPredicate<T> implements Predicate<T> {
|
||||
@Override
|
||||
public boolean test(T t) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@ import java.util.*;
|
||||
|
||||
class A<K, V> {
|
||||
public Iterator<Map.Entry<K, V>> iterator(long revision) {
|
||||
return new MyIterator<K, V>();
|
||||
return new MyIterator<>();
|
||||
}
|
||||
|
||||
private static class MyIterator<K, V> implements Iterator<Map.Entry<K, V>> {
|
||||
|
||||
Reference in New Issue
Block a user