src/share/classes/sun/java2d/loops/GraphicsPrimitive.java
Print this page
rev 9629 : 8038644: Fix raw and unchecked warnings in sun.java2d.*
Reviewed-by:
*** 314,324 ****
CompositeType comptype,
SurfaceType dsttype);
public abstract GraphicsPrimitive traceWrap();
! static HashMap traceMap;
public static int traceflags;
public static String tracefile;
public static PrintStream traceout;
--- 314,324 ----
CompositeType comptype,
SurfaceType dsttype);
public abstract GraphicsPrimitive traceWrap();
! static HashMap<Object, int[]> traceMap;
public static int traceflags;
public static String tracefile;
public static PrintStream traceout;
*** 425,441 ****
});
}
public void run() {
PrintStream ps = getTraceOutputFile();
! Iterator iterator = traceMap.entrySet().iterator();
long total = 0;
int numprims = 0;
while (iterator.hasNext()) {
! Map.Entry me = (Map.Entry) iterator.next();
Object prim = me.getKey();
! int[] count = (int[]) me.getValue();
if (count[0] == 1) {
ps.print("1 call to ");
} else {
ps.print(count[0]+" calls to ");
}
--- 425,442 ----
});
}
public void run() {
PrintStream ps = getTraceOutputFile();
! Iterator<Map.Entry<Object, int[]>> iterator =
! traceMap.entrySet().iterator();
long total = 0;
int numprims = 0;
while (iterator.hasNext()) {
! Map.Entry<Object, int[]> me = iterator.next();
Object prim = me.getKey();
! int[] count = me.getValue();
if (count[0] == 1) {
ps.print("1 call to ");
} else {
ps.print(count[0]+" calls to ");
}
*** 453,471 ****
}
public synchronized static void tracePrimitive(Object prim) {
if ((traceflags & TRACECOUNTS) != 0) {
if (traceMap == null) {
! traceMap = new HashMap();
TraceReporter.setShutdownHook();
}
! Object o = traceMap.get(prim);
if (o == null) {
o = new int[1];
traceMap.put(prim, o);
}
! ((int[]) o)[0]++;
}
if ((traceflags & TRACELOG) != 0) {
PrintStream ps = getTraceOutputFile();
if ((traceflags & TRACETIMESTAMP) != 0) {
ps.print(System.currentTimeMillis()+": ");
--- 454,472 ----
}
public synchronized static void tracePrimitive(Object prim) {
if ((traceflags & TRACECOUNTS) != 0) {
if (traceMap == null) {
! traceMap = new HashMap<>();
TraceReporter.setShutdownHook();
}
! int[] o = traceMap.get(prim);
if (o == null) {
o = new int[1];
traceMap.put(prim, o);
}
! o[0]++;
}
if ((traceflags & TRACELOG) != 0) {
PrintStream ps = getTraceOutputFile();
if ((traceflags & TRACETIMESTAMP) != 0) {
ps.print(System.currentTimeMillis()+": ");