mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 22:14:39 +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:
1 parent
d2808d407a
commit
cec7dfd190
3 files changed
+3
-4
No files matched your search
@@ -428,7 +428,7 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
|
|||||||
*/
|
*/
|
||||||
public void printStat(JCTree tree) throws IOException {
|
public void printStat(JCTree tree) throws IOException {
|
||||||
if (isEmptyStat(tree)) {
|
if (isEmptyStat(tree)) {
|
||||||
printEmptyStat();
|
// printEmptyStat(); // -- starting in java 7, these get lost, so to be consistent, we never print them.
|
||||||
} else {
|
} else {
|
||||||
printExpr(tree, TreeInfo.notExpression);
|
printExpr(tree, TreeInfo.notExpression);
|
||||||
}
|
}
|
||||||
@@ -568,7 +568,9 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
|
|||||||
}
|
}
|
||||||
print(";");
|
print(";");
|
||||||
println();
|
println();
|
||||||
|
int x = 0;
|
||||||
for (List<JCTree> l = stats; l.nonEmpty(); l = l.tail) {
|
for (List<JCTree> l = stats; l.nonEmpty(); l = l.tail) {
|
||||||
|
x++;
|
||||||
if (!isEnumerator(l.head)) {
|
if (!isEnumerator(l.head)) {
|
||||||
align();
|
align();
|
||||||
printStat(l.head);
|
printStat(l.head);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ enum Ranks {
|
|||||||
HEARTS,
|
HEARTS,
|
||||||
DIAMONDS,
|
DIAMONDS,
|
||||||
SPADES;
|
SPADES;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
enum Complex {
|
enum Complex {
|
||||||
RED("ff0000"),
|
RED("ff0000"),
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ interface Interfaces {
|
|||||||
DIAMONDS,
|
DIAMONDS,
|
||||||
SPADES;
|
SPADES;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
;
|
|
||||||
int x = 10;
|
int x = 10;
|
||||||
void y();
|
void y();
|
||||||
int a = 20;
|
int a = 20;
|
||||||
|
|||||||
Reference in new issue
Block a user