--- old/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java 2011-12-01 18:54:52.744395308 +0100 +++ new/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java 2011-12-01 18:54:52.588396923 +0100 @@ -316,6 +316,7 @@ public abstract GraphicsPrimitive traceWrap(); + @SuppressWarnings("rawtypes") static HashMap traceMap; public static int traceflags; @@ -328,7 +329,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 +392,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() { + public FileOutputStream run() { try { return new FileOutputStream(tracefile); } catch (FileNotFoundException e) { @@ -402,7 +403,7 @@ } }); if (o != null) { - traceout = new PrintStream((OutputStream) o); + traceout = new PrintStream(o); } else { traceout = System.err; } @@ -415,8 +416,8 @@ public static class TraceReporter extends Thread { public static void setShutdownHook() { - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { TraceReporter t = new TraceReporter(); t.setContextClassLoader(null); Runtime.getRuntime().addShutdownHook(t); @@ -427,10 +428,12 @@ public void run() { PrintStream ps = getTraceOutputFile(); + @SuppressWarnings("rawtypes") Iterator iterator = traceMap.entrySet().iterator(); long total = 0; int numprims = 0; while (iterator.hasNext()) { + @SuppressWarnings("rawtypes") Map.Entry me = (Map.Entry) iterator.next(); Object prim = me.getKey(); int[] count = (int[]) me.getValue(); @@ -452,6 +455,7 @@ } } + @SuppressWarnings({ "rawtypes", "unchecked" }) public synchronized static void tracePrimitive(Object prim) { if ((traceflags & TRACECOUNTS) != 0) { if (traceMap == null) {