No compile time inherit check
This commit is contained in:
parent
4444825e3e
commit
765c716a5d
|
|
@ -1025,7 +1025,7 @@ public class LSPosedContext extends XposedContext {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@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();
|
var superClass = constructor.getDeclaringClass();
|
||||||
if (!superClass.isAssignableFrom(subClass)) {
|
if (!superClass.isAssignableFrom(subClass)) {
|
||||||
throw new IllegalArgumentException(subClass + " is not inherited from " + superClass);
|
throw new IllegalArgumentException(subClass + " is not inherited from " + superClass);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue