Skip to content

Commit

Permalink
Fix Java 8 compatibility bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qtc-de committed Jun 9, 2024
1 parent da86a39 commit bbbdb9f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/eu/tneitzel/rmg/utils/YsoIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InaccessibleObjectException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.InetAddress;
Expand Down Expand Up @@ -249,7 +248,7 @@ public static Object getPayloadObject(String gadget, String command)
Logger.printlnPlain(" failed.");
Throwable cause = ExceptionHandler.getCause(e);

if (cause instanceof InaccessibleObjectException)
if (cause.getClass().getName().equals("java.lang.reflect.InaccessibleObjectException"))
{
Logger.eprintlnMixedYellow("Caught", "InaccessibleObjectException", "during gadget generation.");
Logger.eprintlnMixedBlue("This is caused by the", "Java module system", "in newer Java versions.");
Expand Down

0 comments on commit bbbdb9f

Please sign in to comment.