CommentTracker#replaceAndRestoreComments: try to keep comments after the statement (not move them to the front)

This commit is contained in:
Tagir Valeev
2018-10-08 14:09:24 +07:00
parent bb5f074e2c
commit c09250da45
21 changed files with 59 additions and 43 deletions
@@ -2,8 +2,7 @@ import java.io.*;
class C {
void m(File file) throws IOException {
//comment after expr
try (FileInputStream fileInputStream = new FileInputStream(file)) {
}
}//comment after expr
}
}
@@ -5,7 +5,6 @@ import java.util.Arrays;
class C {
void m(File file) throws IOException {
//comment
int len;
boolean empty;
try (FileInputStream fileInputStream = new FileInputStream(file)) {
@@ -20,7 +19,7 @@ class C {
empty = false;
}
while (read != -1);
}
}//comment
System.out.println(len);
System.out.println(empty);
}