preserve comments: change new operator type

This commit is contained in:
Anna.Kozlova
2017-12-07 15:51:06 +01:00
parent ef5565903b
commit bacdd1ada8
3 changed files with 23 additions and 10 deletions
@@ -1,9 +1,11 @@
// "Change 'new Runnable() {...}' to 'new StringBuffer()'" "true"
class X {
public StringBuffer buf = new StringBuffer() {
public void run(){
System.out.println("smth");
}
};
//comment0
//comment1
public StringBuffer buf = new StringBuffer() {//comment2
public void run(){
System.out.println("smth");
}
};
}
@@ -1,7 +1,10 @@
// "Change 'new Runnable() {...}' to 'new StringBuffer()'" "true"
class X {
public StringBuffer buf = <caret>new Runnable(){
public StringBuffer buf = <caret>new Runnable//comment0
()
//comment1
{//comment2
public void run(){
System.out.println("smth");
}