Delombok now also prints explicit no-arg super constructor calls, fixes #2023.

This commit is contained in:
Roel Spilker committed 2019-01-21 22:48:36 +01:00
1 parent 1a2a305231
commit d50d63931b
3 files changed
+3

No files matched your search

@@ -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");
}
}
@@ -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() {
@@ -1,5 +1,6 @@
class SneakyThrowsPlain {
SneakyThrowsPlain() {
super();
try {
System.out.println("constructor");
} catch (final java.lang.Throwable $ex) {