< prev index next >
src/java.compiler/share/classes/javax/tools/ToolProvider.java
Print this page
@@ -121,11 +121,13 @@
* @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).newInstance();
+ @SuppressWarnings("deprecation")
+ T result = Class.forName(className, true, ClassLoader.getSystemClassLoader()).asSubclass(clazz).newInstance();
+ return result;
} catch (ReflectiveOperationException e) {
throw new Error(e);
}
}
< prev index next >