--- a/jdk/src/share/classes/sun/net/www/content/image/jpeg.java Thu Dec 29 16:39:51 2011 -0800
+++ b/jdk/src/share/classes/sun/net/www/content/image/jpeg.java Sun Jan 01 09:24:00 2012 +0000
@@ -36,15 +36,16 @@
return new URLImageSource(urlc);
}
- public Object getContent(URLConnection urlc, Class<?>[] classes) throws IOException {
- for (int i = 0; i < classes.length; i++) {
- if (classes[i].isAssignableFrom(URLImageSource.class)) {
+ public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
+ Class<?>[] cls = classes;
+ for (int i = 0; i < cls.length; i++) {
+ if (cls[i].isAssignableFrom(URLImageSource.class)) {
return new URLImageSource(urlc);
- }
- if (classes[i].isAssignableFrom(Image.class)) {
- Toolkit tk = Toolkit.getDefaultToolkit();
- return tk.createImage(new URLImageSource(urlc));
- }
+ }
+ if (cls[i].isAssignableFrom(Image.class)) {
+ Toolkit tk = Toolkit.getDefaultToolkit();
+ return tk.createImage(new URLImageSource(urlc));
+ }
}
return null;
}