No compile time inherit check

This commit is contained in:
LoveSy 2023-01-25 00:28:23 +08:00 committed by LoveSy
parent 4444825e3e
commit 765c716a5d
1 changed files with 1 additions and 1 deletions

View File

@ -1025,7 +1025,7 @@ public class LSPosedContext extends XposedContext {
@NonNull
@Override
public <T, U extends T> U newInstanceSpecial(@NonNull Constructor<T> constructor, @NonNull Class<U> subClass, Object... args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException {
public <T, U> U newInstanceSpecial(@NonNull Constructor<T> constructor, @NonNull Class<U> subClass, Object... args) throws InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException {
var superClass = constructor.getDeclaringClass();
if (!superClass.isAssignableFrom(subClass)) {
throw new IllegalArgumentException(subClass + " is not inherited from " + superClass);