< prev index next >

src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitiveProxy.java

Print this page

        

@@ -78,12 +78,13 @@
     //
     GraphicsPrimitive instantiate() {
         String name = getPackageName(owner.getName()) + "."
                         + relativeClassName;
         try {
-            Class<?> clazz = Class.forName(name);
-            GraphicsPrimitive p = (GraphicsPrimitive) clazz.newInstance();
+            @SuppressWarnings("deprecation")
+            Object object = Class.forName(name).newInstance();
+            GraphicsPrimitive p = (GraphicsPrimitive) object;
             if (!satisfiesSameAs(p)) {
                 throw new RuntimeException("Primitive " + p
                                            + " incompatible with proxy for "
                                            + name);
             }
< prev index next >