From cb6aeb2b6d0ce4b656934286e6d926372db27bf7 Mon Sep 17 00:00:00 2001 From: Milk <1871357815@qq.com> Date: Wed, 16 Feb 2022 12:22:43 +0800 Subject: [PATCH] fix bug --- .../blackreflection/proxy/BlackReflectionProxy.java | 2 +- .../java/top/niunaijun/blackreflection/BlackReflection.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/src/main/java/top/niunaijun/blackreflection/proxy/BlackReflectionProxy.java b/compiler/src/main/java/top/niunaijun/blackreflection/proxy/BlackReflectionProxy.java index 57d9556..da7267d 100644 --- a/compiler/src/main/java/top/niunaijun/blackreflection/proxy/BlackReflectionProxy.java +++ b/compiler/src/main/java/top/niunaijun/blackreflection/proxy/BlackReflectionProxy.java @@ -58,7 +58,7 @@ private MethodSpec generaNotCallerMethod(boolean withException) { MethodSpec.Builder builder = MethodSpec.methodBuilder("get" + (withException ? "WithException" : "")) .addModifiers(Modifier.PUBLIC, Modifier.STATIC) .returns(mStaticInterface); - String statement = "return $T.create($T.class, $L)"; + String statement = "return $T.create($T.class, null, $L)"; builder.addStatement(statement, BR, mStaticInterface, diff --git a/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java b/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java index e0cffa2..0b13279 100644 --- a/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java +++ b/core/src/main/java/top/niunaijun/blackreflection/BlackReflection.java @@ -34,9 +34,9 @@ public class BlackReflection { // key caller private static final WeakHashMap, Object>> sCallerProxyCache = new WeakHashMap<>(); - public static T create(Class clazz, final Object caller) { - return create(clazz, caller, false); - } +// public static T create(Class clazz, final Object caller) { +// return create(clazz, caller, false); +// } public static T create(Class clazz, final Object caller, boolean withException) { try {