< prev index next >
src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java
Print this page
@@ -124,20 +124,22 @@
GetPropertyAction gpa =
new GetPropertyAction("sun.java2d.renderer");
String reClass = AccessController.doPrivileged(gpa);
if (reClass != null) {
try {
- Class<?> cls = Class.forName(reClass);
- reImpl = (RenderingEngine) cls.newInstance();
+ @SuppressWarnings("deprecation")
+ Object tmp = Class.forName(reClass).newInstance();
+ reImpl = (RenderingEngine) tmp;
} catch (ReflectiveOperationException ignored0) {
}
}
if (reImpl == null) {
final String marlinREClass = "sun.java2d.marlin.MarlinRenderingEngine";
try {
- Class<?> cls = Class.forName(marlinREClass);
- reImpl = (RenderingEngine) cls.newInstance();
+ @SuppressWarnings("deprecation")
+ Object tmp = Class.forName(marlinREClass).newInstance();
+ reImpl = (RenderingEngine) tmp;
} catch (ReflectiveOperationException ignored1) {
}
}
if (reImpl == null) {
< prev index next >