mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
change new operator type: anonymous classes processed (IDEA-102236)
This commit is contained in:
+5
-5
@@ -1,9 +1,9 @@
|
||||
// "Change 'new Runnable() {...}' to 'new StringBuffer()'" "true"
|
||||
|
||||
class X {
|
||||
public StringBuffer buf = new StringBuffer(){
|
||||
public void run(){
|
||||
System.out.println("smth");
|
||||
}
|
||||
};
|
||||
public StringBuffer buf = new StringBuffer() {
|
||||
public void run(){
|
||||
System.out.println("smth");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Change 'new Foo<short[]>() {...}' to 'new Boo.Foo<String>()'" "true"
|
||||
|
||||
class Boo {
|
||||
abstract class Foo<T>{}
|
||||
|
||||
private Foo<String> foo()
|
||||
{
|
||||
return new Foo<String>() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'new Foo<short[]>() {...}' to 'new Boo.Foo<String>()'" "true"
|
||||
|
||||
class Boo {
|
||||
abstract class Foo<T>{}
|
||||
|
||||
private Foo<String> foo()
|
||||
{
|
||||
return new Foo<String>() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
// "Change 'new FooImpl<short[]>() {...}' to 'new Boo.FooImpl<String>()'" "true"
|
||||
|
||||
class Boo {
|
||||
abstract class Foo<T>{}
|
||||
abstract class FooImpl<K> extends Foo<K>{}
|
||||
|
||||
private Foo<String> foo()
|
||||
{
|
||||
return new FooImpl<String>() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Change 'new Foo<short[]>() {...}' to 'new Boo.Foo<String>()'" "true"
|
||||
|
||||
class Boo {
|
||||
abstract class Foo<T>{}
|
||||
|
||||
private Foo<String> foo()
|
||||
{
|
||||
return new F<caret>oo<short[]>() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Change 'new Foo<short[]>() {...}' to 'new Boo.Foo<String>()'" "true"
|
||||
|
||||
class Boo {
|
||||
abstract class Foo<T>{}
|
||||
|
||||
private Foo<String> foo()
|
||||
{
|
||||
return new F<caret>oo<short[]>() {};
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Change 'new FooImpl<short[]>() {...}' to 'new Boo.FooImpl<String>()'" "true"
|
||||
|
||||
class Boo {
|
||||
abstract class Foo<T>{}
|
||||
abstract class FooImpl<K> extends Foo<K>{}
|
||||
|
||||
private Foo<String> foo()
|
||||
{
|
||||
return new F<caret>ooImpl<short[]>() {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user