aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2012-07-16 22:04:39 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2012-07-16 22:04:39 +0200
commite6421509987c01e06b7c79ef406cc01ff174ae81 (patch)
treefd86dd5dcdc258c3927b778dc23e01d3ea652e62 /src
parent2502862f896d11b9e386df34f6891918ed443409 (diff)
downloadlombok-e6421509987c01e06b7c79ef406cc01ff174ae81.tar.gz
lombok-e6421509987c01e06b7c79ef406cc01ff174ae81.tar.bz2
lombok-e6421509987c01e06b7c79ef406cc01ff174ae81.zip
Updated tests to reflect changes to delombok (delombok now kills super(), because attrib adds them even in places where that's wrong).
Also split up the SynchronizedName test into separate cases for each expected failure mode.
Diffstat (limited to 'src')
-rw-r--r--src/delombok/lombok/delombok/PrettyCommentsPrinter.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
index 095928ad..2f47ccf6 100644
--- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
@@ -1037,8 +1037,17 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
throw new UncheckedIOException(e);
}
}
-
+
+ private boolean isNoArgsSuperCall(JCExpression expr) {
+ if (!(expr instanceof JCMethodInvocation)) return false;
+ JCMethodInvocation tree = (JCMethodInvocation) expr;
+ if (!tree.typeargs.isEmpty() || !tree.args.isEmpty()) return false;
+ if (!(tree.meth instanceof JCIdent)) return false;
+ return ((JCIdent) tree.meth).name.toString().equals("super");
+ }
+
public void visitExec(JCExpressionStatement tree) {
+ if (isNoArgsSuperCall(tree.expr)) return;
try {
printExpr(tree.expr);
if (prec == TreeInfo.notExpression) print(";");