aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/delombok')
-rw-r--r--src/delombok/lombok/delombok/ant/DelombokTask.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/delombok/lombok/delombok/ant/DelombokTask.java b/src/delombok/lombok/delombok/ant/DelombokTask.java
index cb31ef4d..defd1709 100644
--- a/src/delombok/lombok/delombok/ant/DelombokTask.java
+++ b/src/delombok/lombok/delombok/ant/DelombokTask.java
@@ -188,7 +188,7 @@ class Tasks {
Location loc = getLocation();
try {
- Object instance = shadowLoadClass("lombok.delombok.ant.DelombokTaskImpl").newInstance();
+ Object instance = shadowLoadClass("lombok.delombok.ant.DelombokTaskImpl").getConstructor().newInstance();
for (Field selfField : getClass().getDeclaredFields()) {
if (selfField.isSynthetic() || Modifier.isStatic(selfField.getModifiers())) continue;
Field otherField = instance.getClass().getDeclaredField(selfField.getName());
@@ -208,7 +208,7 @@ class Tasks {
Method m = instance.getClass().getMethod("execute", Location.class);
m.invoke(instance, loc);
} catch (Exception e) {
- Throwable t = (e instanceof InvocationTargetException) ? ((InvocationTargetException) e).getCause() : e;
+ Throwable t = (e instanceof InvocationTargetException) ? e.getCause() : e;
if (t instanceof Error) throw (Error) t;
if (t instanceof RuntimeException) throw (RuntimeException) t;
throw new RuntimeException(t);