mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-11 12:19:00 +00:00
Delombok now also prints explicit no-arg super constructor calls, fixes #2023.
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user