Commit e087afcd authored by Adam Blank's avatar Adam Blank
Browse files

Updates reflection library

parent bfdca2fe
No related merge requests found
Pipeline #3884 canceled with stage
in 48 seconds
Showing with 26 additions and 14 deletions
+26 -14
......@@ -61,7 +61,13 @@ public class Reflection {
try {
result = (T) m.invoke(args[0], Arrays.copyOfRange(args, 1, args.length));
} catch (IllegalAccessException | InvocationTargetException e) {
fail(e.getCause());
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException)e.getCause();
}
else {
fail(cause);
}
}
return result;
}
......@@ -72,7 +78,13 @@ public class Reflection {
try {
result = (T) m.invoke(null, args);
} catch (IllegalAccessException | InvocationTargetException e) {
fail(e.getCause());
Throwable cause = e.getCause();
if (cause instanceof RuntimeException) {
throw (RuntimeException)e.getCause();
}
else {
fail(cause);
}
}
return result;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment