From d471658f369092d4629bdf9d824296c591e2b8f8 Mon Sep 17 00:00:00 2001 From: "lytles@takashi" Date: Tue, 25 Sep 2018 23:40:59 -0400 Subject: [PATCH] cleanup godMode --- src/com/nqzero/unflect/Support9.java | 6 +++--- src/com/nqzero/unflect/Unflect.java | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/com/nqzero/unflect/Support9.java b/src/com/nqzero/unflect/Support9.java index cd92d8d..2d4bb66 100644 --- a/src/com/nqzero/unflect/Support9.java +++ b/src/com/nqzero/unflect/Support9.java @@ -1,15 +1,15 @@ package com.nqzero.unflect; -import static com.nqzero.unflect.Unflect.dbg; import java.lang.reflect.Method; import java.util.HashSet; -import static com.nqzero.unflect.Unflect.setAccessible; public class Support9 { + static boolean dbg = false; + public static void godMode() { try { Method export = Module.class.getDeclaredMethod("implAddOpens",String.class); - setAccessible(export); + Unflect.setAccessible(export); HashSet modules = new HashSet(); Module base = Safer.class.getModule(); if (base.getLayer() != null) diff --git a/src/com/nqzero/unflect/Unflect.java b/src/com/nqzero/unflect/Unflect.java index 4076367..70093ce 100644 --- a/src/com/nqzero/unflect/Unflect.java +++ b/src/com/nqzero/unflect/Unflect.java @@ -26,8 +26,6 @@ public static void unLog() { } - static boolean dbg = false; - public static void godMode() { try { // this will fail on java 8 and lower