mirror of
https://github.com/tiennm99/lombok.git
synced 2026-06-09 18:14:34 +00:00
Empty statements no longer being printed to be consistent with Javac7 which seems to just remove these from the AST entirely.
This commit is contained in:
@@ -428,7 +428,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
|
||||
*/
|
||||
public void printStat(JCTree tree) throws IOException {
|
||||
if (isEmptyStat(tree)) {
|
||||
printEmptyStat();
|
||||
// printEmptyStat(); // -- starting in java 7, these get lost, so to be consistent, we never print them.
|
||||
} else {
|
||||
printExpr(tree, TreeInfo.notExpression);
|
||||
}
|
||||
@@ -568,7 +568,9 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
|
||||
}
|
||||
print(";");
|
||||
println();
|
||||
int x = 0;
|
||||
for (List<JCTree> l = stats; l.nonEmpty(); l = l.tail) {
|
||||
x++;
|
||||
if (!isEnumerator(l.head)) {
|
||||
align();
|
||||
printStat(l.head);
|
||||
|
||||
@@ -3,7 +3,6 @@ enum Ranks {
|
||||
HEARTS,
|
||||
DIAMONDS,
|
||||
SPADES;
|
||||
;
|
||||
}
|
||||
enum Complex {
|
||||
RED("ff0000"),
|
||||
|
||||
@@ -6,8 +6,6 @@ interface Interfaces {
|
||||
DIAMONDS,
|
||||
SPADES;
|
||||
}
|
||||
;
|
||||
;
|
||||
int x = 10;
|
||||
void y();
|
||||
int a = 20;
|
||||
|
||||
Reference in New Issue
Block a user