< prev index next >
src/share/classes/javax/swing/plaf/synth/ImagePainter.java
Print this page
rev 1580 : 6727661: Code improvement and warnings removing from the swing/plaf packages
Summary: Removed unnecessary castings and other warnings
Reviewed-by: alexp
Contributed-by: Florian Brunner <fbrunnerlist@gmx.ch>
*** 63,73 ****
(WeakReference<Paint9Painter>)AppContext.getAppContext().
get(CACHE_KEY);
Paint9Painter painter;
if (cacheRef == null || (painter = cacheRef.get()) == null) {
painter = new Paint9Painter(30);
! cacheRef = new WeakReference(painter);
AppContext.getAppContext().put(CACHE_KEY, cacheRef);
}
return painter;
}
}
--- 63,73 ----
(WeakReference<Paint9Painter>)AppContext.getAppContext().
get(CACHE_KEY);
Paint9Painter painter;
if (cacheRef == null || (painter = cacheRef.get()) == null) {
painter = new Paint9Painter(30);
! cacheRef = new WeakReference<Paint9Painter>(painter);
AppContext.getAppContext().put(CACHE_KEY, cacheRef);
}
return painter;
}
}
< prev index next >