8003851: MethodHandleNatives dependency on java.sql.DriverManager
Reviewed-by: alanb, dholmes
This commit is contained in:
parent
996befafc2
commit
6c4d705c91
@ -448,7 +448,7 @@ class MethodHandleNatives {
|
|||||||
case "getDriver":
|
case "getDriver":
|
||||||
case "getDrivers":
|
case "getDrivers":
|
||||||
case "deregisterDriver":
|
case "deregisterDriver":
|
||||||
return defc == java.sql.DriverManager.class;
|
return defc == getClass("java.sql.DriverManager");
|
||||||
case "newUpdater":
|
case "newUpdater":
|
||||||
if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true;
|
if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class) return true;
|
||||||
if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true;
|
if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class) return true;
|
||||||
@ -482,4 +482,14 @@ class MethodHandleNatives {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// avoid static dependency to a class in other modules
|
||||||
|
private static Class<?> getClass(String cn) {
|
||||||
|
try {
|
||||||
|
return Class.forName(cn, false,
|
||||||
|
MethodHandleNatives.class.getClassLoader());
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new InternalError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user