aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/delombok/lombok/delombok/PrettyPrinter.java1
-rw-r--r--test/transform/resource/after-delombok/DataPlain.java1
-rw-r--r--test/transform/resource/after-delombok/SneakyThrowsPlain.java1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java
index 3fb1f1b1..69249cc9 100644
--- a/src/delombok/lombok/delombok/PrettyPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyPrinter.java
@@ -258,6 +258,7 @@ public class PrettyPrinter extends JCTree.Visitor {
JCMethodInvocation inv = (JCMethodInvocation) expr;
if (!inv.typeargs.isEmpty() || !inv.args.isEmpty()) return false;
if (!(inv.meth instanceof JCIdent)) return false;
+ if (tree.pos != expr.pos) return false; // Explicit super call
return ((JCIdent) inv.meth).name.toString().equals("super");
}
}
diff --git a/test/transform/resource/after-delombok/DataPlain.java b/test/transform/resource/after-delombok/DataPlain.java
index e7d452b6..15b834d9 100644
--- a/test/transform/resource/after-delombok/DataPlain.java
+++ b/test/transform/resource/after-delombok/DataPlain.java
@@ -152,6 +152,7 @@ final class Data3 {
final class Data4 extends java.util.Timer {
int x;
Data4() {
+ super();
}
@java.lang.SuppressWarnings("all")
public int getX() {
diff --git a/test/transform/resource/after-delombok/SneakyThrowsPlain.java b/test/transform/resource/after-delombok/SneakyThrowsPlain.java
index 86f7790c..32ab8054 100644
--- a/test/transform/resource/after-delombok/SneakyThrowsPlain.java
+++ b/test/transform/resource/after-delombok/SneakyThrowsPlain.java
@@ -1,5 +1,6 @@
class SneakyThrowsPlain {
SneakyThrowsPlain() {
+ super();
try {
System.out.println("constructor");
} catch (final java.lang.Throwable $ex) {