< prev index next >
src/java.compiler/share/classes/javax/tools/ToolProvider.java
Print this page
*** 123,135 ****
* @return the specified implementation of the tool
*/
private static <T> T getSystemTool(Class<T> clazz, String moduleName, String className) {
if (useLegacy) {
try {
! @SuppressWarnings("deprecation")
! T result = Class.forName(className, true, ClassLoader.getSystemClassLoader()).asSubclass(clazz).newInstance();
! return result;
} catch (ReflectiveOperationException e) {
throw new Error(e);
}
}
--- 123,134 ----
* @return the specified implementation of the tool
*/
private static <T> T getSystemTool(Class<T> clazz, String moduleName, String className) {
if (useLegacy) {
try {
! return Class.forName(className, true, ClassLoader.getSystemClassLoader()).
! asSubclass(clazz).getConstructor().newInstance();
} catch (ReflectiveOperationException e) {
throw new Error(e);
}
}
< prev index next >