jdk/src/share/classes/sun/net/www/content/image/jpeg.java
changeset 11362 02eae572563e
parent 10596 39b3a979e600
child 14342 8435a30053c1
--- 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;
     }