jdk/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java
changeset 11080 7e18e343964e
parent 7668 d4a77089c587
child 23010 6dadb192ad81
--- a/jdk/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java	Wed Jul 05 17:56:18 2017 +0200
+++ b/jdk/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java	Sat Dec 03 15:40:49 2011 +0100
@@ -328,7 +328,7 @@
 
     static {
         GetPropertyAction gpa = new GetPropertyAction("sun.java2d.trace");
-        String trace = (String)AccessController.doPrivileged(gpa);
+        String trace = AccessController.doPrivileged(gpa);
         if (trace != null) {
             boolean verbose = false;
             int traceflags = 0;
@@ -391,9 +391,9 @@
     private static PrintStream getTraceOutputFile() {
         if (traceout == null) {
             if (tracefile != null) {
-                Object o =
-                    AccessController.doPrivileged(new PrivilegedAction() {
-                        public Object run() {
+                FileOutputStream o = AccessController.doPrivileged(
+                    new PrivilegedAction<FileOutputStream>() {
+                        public FileOutputStream run() {
                             try {
                                 return new FileOutputStream(tracefile);
                             } catch (FileNotFoundException e) {
@@ -402,7 +402,7 @@
                         }
                     });
                 if (o != null) {
-                    traceout = new PrintStream((OutputStream) o);
+                    traceout = new PrintStream(o);
                 } else {
                     traceout = System.err;
                 }
@@ -415,8 +415,8 @@
 
     public static class TraceReporter extends Thread {
         public static void setShutdownHook() {
-            AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                public Void run() {
                     TraceReporter t = new TraceReporter();
                     t.setContextClassLoader(null);
                     Runtime.getRuntime().addShutdownHook(t);