aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/delombok/lombok/delombok/PrettyCommentsPrinter.java4
-rw-r--r--test/pretty/resource/after/Enum.java1
-rw-r--r--test/pretty/resource/after/Interfaces.java2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
index 2f47ccf6..8569db5b 100644
--- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
@@ -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);
diff --git a/test/pretty/resource/after/Enum.java b/test/pretty/resource/after/Enum.java
index 9968b457..dd738b5b 100644
--- a/test/pretty/resource/after/Enum.java
+++ b/test/pretty/resource/after/Enum.java
@@ -3,7 +3,6 @@ enum Ranks {
HEARTS,
DIAMONDS,
SPADES;
- ;
}
enum Complex {
RED("ff0000"),
diff --git a/test/pretty/resource/after/Interfaces.java b/test/pretty/resource/after/Interfaces.java
index b620e038..6c0a6770 100644
--- a/test/pretty/resource/after/Interfaces.java
+++ b/test/pretty/resource/after/Interfaces.java
@@ -6,8 +6,6 @@ interface Interfaces {
DIAMONDS,
SPADES;
}
- ;
- ;
int x = 10;
void y();
int a = 20;