harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r447684 - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt: ./ datatransfer/ gl/
Date Tue, 19 Sep 2006 02:37:43 GMT
Author: ndbeyer
Date: Mon Sep 18 19:37:41 2006
New Revision: 447684

URL: http://svn.apache.org/viewvc?view=rev&rev=447684
Log:
Code cleanup; remove compiler warnings, add braces, etc

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ClipRegion.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/FieldsAccessor.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ListenerList.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ReadOnlyIterator.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/RelativeTimer.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollbarStateController.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/SingleShotTimer.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProvider.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProxy.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSnapshot.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSource.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataTransferThread.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/FlavorsComparator.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphicsEnvironment.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Crossing.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ICompositeContext.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/MultiRectArea.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Utils.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ClipRegion.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ClipRegion.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ClipRegion.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ClipRegion.java Mon Sep 18 19:37:41 2006
@@ -24,8 +24,6 @@
 
 import org.apache.harmony.awt.gl.MultiRectArea;
 
-
-
 public class ClipRegion extends Rectangle {
     private final MultiRectArea clip;
 
@@ -38,6 +36,7 @@
         return clip;
     }
 
+    @Override
     public String toString() {
         String str = clip.toString();
         int i = str.indexOf('[');
@@ -57,6 +56,7 @@
         clip.intersect(rect);
     }
 
+    @Override
     public boolean isEmpty() {
         return clip.isEmpty();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/FieldsAccessor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/FieldsAccessor.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/FieldsAccessor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/FieldsAccessor.java Mon Sep 18 19:37:41 2006
@@ -28,7 +28,7 @@
  */
 public class FieldsAccessor {
 
-    private final Class clazz;
+    private final Class<?> clazz;
     private final Object object;
     private final ObjectAccessor accessor;
 
@@ -39,7 +39,7 @@
      *  Bad example: <code>this.getClass()</code>
      * @param object - object being modified
      */
-    public FieldsAccessor(Class clazz, Object object) {
+    public FieldsAccessor(Class<?> clazz, Object object) {
         accessor = AccessorFactory.getObjectAccessor();
         this.clazz = clazz;
         this.object = object;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ListenerList.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ListenerList.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ListenerList.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ListenerList.java Mon Sep 18 19:37:41 2006
@@ -24,6 +24,7 @@
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.EventListener;
 import java.util.Iterator;
 import java.util.List;
@@ -37,10 +38,8 @@
 public class ListenerList<T> implements Serializable {
     private static final long serialVersionUID = 9180703263299648154L;
 
-    private static final Iterator dummyIterator = new ArrayList().iterator();
-
-    private transient ArrayList systemList = null;
-    private transient ArrayList<T> userList = null;
+    private transient ArrayList<EventListener> systemList;
+    private transient ArrayList<T> userList;
 
     /**
      * Adds system listener to this list.
@@ -49,7 +48,7 @@
      */
     public void addSystemListener(EventListener listener) {
         if (systemList == null) {
-            systemList = new ArrayList();
+            systemList = new ArrayList<EventListener>();
         }
         systemList.add(listener);
     }
@@ -104,8 +103,7 @@
      */
     public EventListener[] getUserListeners(EventListener[] emptyArray){
         synchronized (this) {
-            return (EventListener[])
-                (userList != null ? userList.toArray(emptyArray) : emptyArray);
+            return (userList != null ? userList.toArray(emptyArray) : emptyArray);
 
         }
     }
@@ -126,13 +124,13 @@
      *
      * @return iterator for user listeners.
      */
-    public Iterator getUserIterator() {
+    public Iterator<T> getUserIterator() {
         synchronized (this) {
             if (userList == null) {
-                return dummyIterator;
-            } else {
-                return new ReadOnlyIterator(userList.iterator());
+                List<T> emptyList = Collections.emptyList();
+                return emptyList.iterator();
             }
+            return new ReadOnlyIterator<T>(userList.iterator());
         }
     }
 
@@ -141,17 +139,17 @@
      *
      * @return iterator for system listeners.
      */
-    public Iterator getSystemIterator() {
+    public Iterator<EventListener> getSystemIterator() {
         return systemList.iterator();
     }
 
-    private static ArrayList getOnlySerializable(ArrayList list) {
+    private static ArrayList<?> getOnlySerializable(ArrayList<?> list) {
         if (list == null) {
             return null;
         }
 
-        ArrayList result = new ArrayList();
-        for (Iterator it = list.iterator(); it.hasNext();) {
+        ArrayList<Object> result = new ArrayList<Object>();
+        for (Iterator<?> it = list.iterator(); it.hasNext();) {
             Object obj = it.next();
             if (obj instanceof Serializable) {
                 result.add(obj);
@@ -169,12 +167,13 @@
         stream.writeObject(getOnlySerializable(userList));
     }
 
+    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream stream)
             throws IOException, ClassNotFoundException {
 
         stream.defaultReadObject();
 
-        systemList = (ArrayList)stream.readObject();
+        systemList = (ArrayList<EventListener>)stream.readObject();
         userList = (ArrayList<T>)stream.readObject();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ReadOnlyIterator.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ReadOnlyIterator.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ReadOnlyIterator.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ReadOnlyIterator.java Mon Sep 18 19:37:41 2006
@@ -24,11 +24,11 @@
 /**
  * ReadOnlyIterator
  */
-public final class ReadOnlyIterator implements Iterator {
+public final class ReadOnlyIterator<E> implements Iterator<E> {
 
-    private final Iterator it;
+    private final Iterator<E> it;
 
-    public ReadOnlyIterator(Iterator it) {
+    public ReadOnlyIterator(Iterator<E> it) {
         if (it == null) {
             throw new NullPointerException();
         }
@@ -43,7 +43,7 @@
         return it.hasNext();
     }
 
-    public Object next() {
+    public E next() {
         return it.next();
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/RelativeTimer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/RelativeTimer.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/RelativeTimer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/RelativeTimer.java Mon Sep 18 19:37:41 2006
@@ -19,7 +19,8 @@
  */
 package org.apache.harmony.awt;
 
-import java.util.*;
+import java.util.Iterator;
+import java.util.LinkedList;
 
 /**
  * Relative timer class. Basic class for PeriodicTimer and SingleShotTimer.
@@ -124,13 +125,12 @@
 
     private static class DeltaList {
 
-        private final LinkedList list;
-
+        private final LinkedList<DeltaListEntry> list;
         private DeltaThread thread;
         private long time;
 
         DeltaList() {
-            list = new LinkedList();
+            list = new LinkedList<DeltaListEntry>();
             time = 0;
             thread = null;
         }
@@ -173,7 +173,7 @@
                 if (index == 0) {
                     firstRemoved();
                 } else {
-                    ((DeltaListEntry) list.get(index)).time += entry.time;
+                    list.get(index).time += entry.time;
                 }
             }
         }
@@ -204,8 +204,8 @@
             long curTime = System.currentTimeMillis();
 
             if (time <= curTime) {
-                while (((DeltaListEntry) list.getFirst()).time <= curTime) {
-                    DeltaListEntry first = (DeltaListEntry) list.removeFirst();
+                while (list.getFirst().time <= curTime) {
+                    DeltaListEntry first = list.removeFirst();
 
                     if (!list.isEmpty()) {
                         firstRemoved();
@@ -225,7 +225,7 @@
         }
 
         private void firstRemoved() {
-            DeltaListEntry nextFirst = (DeltaListEntry) list.getFirst();
+            DeltaListEntry nextFirst = list.getFirst();
 
             time += nextFirst.time;
             nextFirst.time = time;
@@ -233,39 +233,35 @@
 
         private void insert(DeltaListEntry entry, boolean interrupt) {
             long oldTime = list.isEmpty() ? Long.MAX_VALUE : time;
-            Iterator i = list.iterator();
+            Iterator<DeltaListEntry> i = list.iterator();
 
             do {
                 if (!i.hasNext()) {
                     list.addLast(entry);
                     break;
-                } else {
-                    DeltaListEntry next = (DeltaListEntry) i.next();
+                }
+                DeltaListEntry next = i.next();
 
-                    if (next.time <= entry.time) {
-                        entry.time -= next.time;
-                    } else {
-                        next.time -= entry.time;
-                        list.add(list.indexOf(next), entry);
-                        break;
-                    }
+                if (next.time <= entry.time) {
+                    entry.time -= next.time;
+                } else {
+                    next.time -= entry.time;
+                    list.add(list.indexOf(next), entry);
+                    break;
                 }
             } while (true);
 
-            time = ((DeltaListEntry) list.getFirst()).time;
+            time = list.getFirst().time;
             if ((time < oldTime) && interrupt) {
                 thread.interrupt();
             }
         }
 
         private class DeltaThread extends Thread {
-
+            @Override
             public void run() {
                 loop();
             }
-
         };
-
     }
-
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollStateController.java Mon Sep 18 19:37:41 2006
@@ -110,6 +110,7 @@
      * Recalculates internal scrollable layout
      * on component resize
      */
+    @Override
     public void componentResized(ComponentEvent e) {
         if (!component.isDisplayable()) {
             return;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollbarStateController.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollbarStateController.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollbarStateController.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/ScrollbarStateController.java Mon Sep 18 19:37:41 2006
@@ -164,6 +164,7 @@
             return dragged;
         }
 
+        @Override
         boolean mouseReleased(Point pt) {
            boolean result = super.mouseReleased(pt);
 
@@ -173,6 +174,7 @@
             return result;
         }
 
+        @Override
         boolean mouseDragged(Point pt) {
             boolean result = super.mouseDragged(pt);
 
@@ -258,6 +260,7 @@
             super(dir);
         }
 
+        @Override
         void scroll() {
             int dir = getBlockDir(new Point(curMouseX, curMouseY));
             if (this.dir != dir) {
@@ -296,7 +299,6 @@
         boolean incrPressed = incr.mousePressed(pt);
         boolean decrPressed = decr.mousePressed(pt);
         slider.mousePressed(pt);
-        boolean block = false;
         if (incrPressed || decrPressed) {
             int dir = (incrPressed ? 1 : -1);
             scrollByUnit(dir);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/SingleShotTimer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/SingleShotTimer.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/SingleShotTimer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/SingleShotTimer.java Mon Sep 18 19:37:41 2006
@@ -44,6 +44,7 @@
         return interval;
     }
 
+    @Override
     void handle() {
         super.handle();
         stop();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProvider.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProvider.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProvider.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProvider.java Mon Sep 18 19:37:41 2006
@@ -71,5 +71,5 @@
     
     public RawBitmap getRawBitmap();
     
-    public byte[] getSerializedObject(Class clazz);
+    public byte[] getSerializedObject(Class<?> clazz);
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProxy.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProxy.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProxy.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataProxy.java Mon Sep 18 19:37:41 2006
@@ -103,19 +103,19 @@
     }
 
     public DataFlavor[] getTransferDataFlavors() {
-        ArrayList result = new ArrayList();
+        ArrayList<DataFlavor> result = new ArrayList<DataFlavor>();
         String[] natives = data.getNativeFormats();
         
         for (int i = 0; i < natives.length; i++) {
-            List flavors = flavorMap.getFlavorsForNative(natives[i]);
-            for (Iterator it = flavors.iterator(); it.hasNext(); ) {
-                DataFlavor f = (DataFlavor)it.next();
+            List<DataFlavor> flavors = flavorMap.getFlavorsForNative(natives[i]);
+            for (Iterator<DataFlavor> it = flavors.iterator(); it.hasNext(); ) {
+                DataFlavor f = it.next();
                 if (!result.contains(f)) {
                     result.add(f);
                 }
             }
         }
-        return (DataFlavor[])result.toArray(new DataFlavor[0]);
+        return result.toArray(new DataFlavor[result.size()]);
     }
     
     public boolean isDataFlavorSupported(DataFlavor flavor) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSnapshot.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSnapshot.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSnapshot.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSnapshot.java Mon Sep 18 19:37:41 2006
@@ -39,7 +39,7 @@
     
     private final String[] nativeFormats;
     /** Class -> byte[] */
-    private final Map serializedObjects;
+    private final Map<Class<?>, byte[]> serializedObjects;
     
     /**
      * @param dataObject
@@ -52,7 +52,7 @@
         html = data.getHTML();
         rawBitmap = data.getRawBitmap();
         
-        serializedObjects = Collections.synchronizedMap(new HashMap());
+        serializedObjects = Collections.synchronizedMap(new HashMap<Class<?>, byte[]>());
         
         for (int i = 0; i < nativeFormats.length; i++) {
             DataFlavor df = null;
@@ -60,7 +60,7 @@
                 df = SystemFlavorMap.decodeDataFlavor(nativeFormats[i]);
             } catch (ClassNotFoundException e) {}
             if (df != null) {
-                Class clazz = df.getRepresentationClass();
+                Class<?> clazz = df.getRepresentationClass();
                 byte[] bytes = data.getSerializedObject(clazz);
                 if (bytes != null) {
                     serializedObjects.put(clazz, bytes);
@@ -136,8 +136,8 @@
                 (int[])rawBitmap.buffer : null;
     }
     
-    public byte[] getSerializedObject(Class clazz) {
-        return (byte[])serializedObjects.get(clazz);
+    public byte[] getSerializedObject(Class<?> clazz) {
+        return serializedObjects.get(clazz);
     }
 
     public byte[] getSerializedObject(String nativeFormat) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSource.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSource.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSource.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataSource.java Mon Sep 18 19:37:41 2006
@@ -44,7 +44,7 @@
 
     // Cached data from transferable object
     private DataFlavor[] flavors;
-    private List nativeFormats;
+    private List<String> nativeFormats;
     
     protected final Transferable contents;
     
@@ -64,10 +64,10 @@
     }
     
     public String[] getNativeFormats() {
-        return (String[])getNativeFormatsList().toArray(new String[0]);
+        return getNativeFormatsList().toArray(new String[0]);
     }
     
-    public List getNativeFormatsList() {
+    public List<String> getNativeFormatsList() {
         if (nativeFormats == null) {
             DataFlavor[] flavors = getDataFlavors();
             nativeFormats = getNativesForFlavors(flavors);
@@ -76,16 +76,16 @@
         return nativeFormats;
     }
     
-    private static List getNativesForFlavors(DataFlavor[] flavors) {
-        ArrayList natives = new ArrayList();
+    private static List<String> getNativesForFlavors(DataFlavor[] flavors) {
+        ArrayList<String> natives = new ArrayList<String>();
         
         SystemFlavorMap flavorMap = 
             (SystemFlavorMap)SystemFlavorMap.getDefaultFlavorMap();
         
         for (int i = 0; i < flavors.length; i++) {
-            List list = flavorMap.getNativesForFlavor(flavors[i]);
-            for (Iterator it = list.iterator(); it.hasNext(); ) {
-                String nativeFormat = (String)it.next();
+            List<String> list = flavorMap.getNativesForFlavor(flavors[i]);
+            for (Iterator<String> it = list.iterator(); it.hasNext(); ) {
+                String nativeFormat = it.next();
                 if (!natives.contains(nativeFormat)) {
                     natives.add(nativeFormat);
                 }
@@ -95,8 +95,7 @@
     }
     
     private String getTextFromReader(Reader r) throws IOException {
-        // TODO: use StringBuilder here
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         char chunk[] = new char[1024];
         int len;
         while ((len = r.read(chunk)) > 0) {
@@ -133,9 +132,8 @@
 
     public String[] getFileList() {
         try {
-            List list = (List)contents.getTransferData(
-                    DataFlavor.javaFileListFlavor);
-            return (String[])list.toArray(new String[0]);
+            List<?> list = (List<?>) contents.getTransferData(DataFlavor.javaFileListFlavor);
+            return list.toArray(new String[list.size()]);
         } catch (Exception e) {
             return null;
         }
@@ -166,7 +164,7 @@
 
         for (int i = 0; i < flavors.length; i++) {
             DataFlavor f = flavors[i];
-            Class c = f.getRepresentationClass();
+            Class<?> c = f.getRepresentationClass();
             if (c != null && Image.class.isAssignableFrom(c) && 
                     (f.isMimeTypeEqual(DataFlavor.imageFlavor) || 
                             f.isFlavorSerializedObjectType())) {
@@ -217,7 +215,7 @@
                 32, 0xFF0000, 0xFF00, 0xFF, buffer);
     }
 
-    public byte[] getSerializedObject(Class clazz) {
+    public byte[] getSerializedObject(Class<?> clazz) {
         try {
             DataFlavor f = new DataFlavor(clazz, null);
             Serializable s = (Serializable)contents.getTransferData(f);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataTransferThread.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataTransferThread.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataTransferThread.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DataTransferThread.java Mon Sep 18 19:37:41 2006
@@ -32,6 +32,7 @@
         this.dtk = dtk;
     }
     
+    @Override
     public void run() {
         synchronized (this) {
             try {
@@ -43,6 +44,7 @@
         dtk.runEventLoop();
     }
     
+    @Override
     public void start() {
         synchronized (this) {
             super.start();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/FlavorsComparator.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/FlavorsComparator.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/FlavorsComparator.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/FlavorsComparator.java Mon Sep 18 19:37:41 2006
@@ -25,13 +25,9 @@
 /**
  * Flavors comparator. Used for sorting text flavors.
  */
-public class FlavorsComparator implements Comparator {
+public class FlavorsComparator implements Comparator<DataFlavor> {
 
-    private final DataFlavor[] arr = new DataFlavor[2];
-
-    public int compare(Object o1, Object o2) {
-        DataFlavor flav1 = (DataFlavor) o1;
-        DataFlavor flav2 = (DataFlavor) o2;
+    public int compare(DataFlavor flav1, DataFlavor flav2) {
 
         if (!flav1.isFlavorTextType() && !flav2.isFlavorTextType()) {
             return 0;
@@ -40,10 +36,8 @@
         } else if (flav1.isFlavorTextType() && !flav2.isFlavorTextType()) {
             return 1;
         } else {
-            arr[0] = flav1;
-            arr[1] = flav2;
-
-            return (DataFlavor.selectBestTextFlavor(arr) == flav1) ? -1 : 1;
+            DataFlavor df = DataFlavor.selectBestTextFlavor(new DataFlavor[] { flav1, flav2 });
+            return (df == flav1) ? -1 : 1;
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java Mon Sep 18 19:37:41 2006
@@ -174,10 +174,12 @@
     }
 
     // Public methods
+    @Override
     public void addRenderingHints(Map<?,?> hints) {
         this.hints.putAll(hints);
     }
 
+    @Override
     public void clearRect(int x, int y, int width, int height) {
         Color c = getColor();
         Paint p = getPaint();
@@ -185,15 +187,18 @@
         fillRect(x, y, width, height);
         setColor(c);
         setPaint(p);
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.clearRect("+x+", "+y+", "+width+", "+height+")");
+        }
     }
 
+    @Override
     public void clipRect(int x, int y, int width, int height) {
         clip(new Rectangle(x, y, width, height));
     }
 
 
+    @Override
     public void clip(Shape s) {
         if (s == null) {
             clip = null;
@@ -209,14 +214,15 @@
             mra = jsr.rasterize(s, 0.5);
         }
 
-        if (clip == null)
+        if (clip == null) {
             setTransformedClip(mra);
-        else {
+        } else {
             clip.intersect(mra);
             setTransformedClip(clip);
         }
     }
 
+    @Override
     public void dispose() {
         // Do nothing for Java only classes
     }
@@ -230,6 +236,7 @@
      *
      ***************************************************************************/
 
+    @Override
     public void draw(Shape s) {
         if (stroke instanceof BasicStroke && ((BasicStroke)stroke).getLineWidth() <= 1) {
             //TODO: Think about drawing the shape in one fillMultiRectArea call
@@ -273,6 +280,7 @@
         }
     }
 
+    @Override
     public void drawArc(int x, int y, int width, int height, int sa, int ea) {
         if (stroke instanceof BasicStroke && ((BasicStroke)stroke).getLineWidth() <= 1 &&
                 ((BasicStroke)stroke).getDashArray() == null && 
@@ -287,17 +295,22 @@
     }
 
 
+    @Override
     public boolean drawImage(Image image, int x, int y, Color bgcolor,
             ImageObserver imageObserver) {
 
-        if(image == null) return true;
+        if(image == null) {
+            return true;
+        }
 
         boolean done = false;
         boolean somebits = false;
         Surface srcSurf = null;
         if(image instanceof OffscreenImage){
             OffscreenImage oi = (OffscreenImage) image;
-            if((oi.getState() & ImageObserver.ERROR) != 0) return false;
+            if((oi.getState() & ImageObserver.ERROR) != 0) {
+                return false;
+            }
             done = oi.prepareImage(imageObserver);
             somebits = (oi.getState() & ImageObserver.SOMEBITS) != 0;
             srcSurf = oi.getImageSurface();
@@ -315,15 +328,21 @@
         return done;
     }
 
+    @Override
     public boolean drawImage(Image image, int x, int y, ImageObserver imageObserver) {
         return drawImage(image, x, y, null, imageObserver);
     }
 
+    @Override
     public boolean drawImage(Image image, int x, int y, int width, int height,
             Color bgcolor, ImageObserver imageObserver) {
 
-        if(image == null) return true;
-        if(width == 0 || height == 0) return true;
+        if(image == null) {
+            return true;
+        }
+        if(width == 0 || height == 0) {
+            return true;
+        }
 
         boolean done = false;
         boolean somebits = false;
@@ -331,7 +350,9 @@
 
         if(image instanceof OffscreenImage){
             OffscreenImage oi = (OffscreenImage) image;
-            if((oi.getState() & ImageObserver.ERROR) != 0) return false;
+            if((oi.getState() & ImageObserver.ERROR) != 0) {
+                return false;
+            }
             done = oi.prepareImage(imageObserver);
             somebits = (oi.getState() & ImageObserver.SOMEBITS) != 0;
             srcSurf = oi.getImageSurface();
@@ -358,25 +379,32 @@
         return done;
     }
 
+    @Override
     public boolean drawImage(Image image, int x, int y, int width, int height,
             ImageObserver imageObserver) {
         return drawImage(image, x, y, width, height, null, imageObserver);
     }
 
+    @Override
     public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2,
             int sx1, int sy1, int sx2, int sy2, Color bgcolor,
             ImageObserver imageObserver) {
 
-        if(image == null) return true;
-        if(dx1 == dx2 || dy1 == dy2 || sx1 == sx2 || sy1 == sy2)
+        if(image == null) {
             return true;
+        }
+        if(dx1 == dx2 || dy1 == dy2 || sx1 == sx2 || sy1 == sy2) {
+            return true;
+        }
 
         boolean done = false;
         boolean somebits = false;
         Surface srcSurf = null;
         if(image instanceof OffscreenImage){
             OffscreenImage oi = (OffscreenImage) image;
-            if((oi.getState() & ImageObserver.ERROR) != 0) return false;
+            if((oi.getState() & ImageObserver.ERROR) != 0) {
+                return false;
+            }
             done = oi.prepareImage(imageObserver);
             somebits = (oi.getState() & ImageObserver.SOMEBITS) != 0;
             srcSurf = oi.getImageSurface();
@@ -412,6 +440,7 @@
         return done;
     }
 
+    @Override
     public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2,
             int sx1, int sy1, int sx2, int sy2, ImageObserver imageObserver) {
 
@@ -419,10 +448,13 @@
                 imageObserver);
      }
 
+    @Override
     public void drawImage(BufferedImage bufImage, BufferedImageOp op,
             int x, int y) {
 
-        if(bufImage == null) return;
+        if(bufImage == null) {
+            return;
+        }
 
         if(op == null) {
             drawImage(bufImage, x, y, null);
@@ -446,10 +478,13 @@
         }
     }
 
+    @Override
     public boolean drawImage(Image image, AffineTransform trans,
             ImageObserver imageObserver) {
 
-        if(image == null) return true;
+        if(image == null) {
+            return true;
+        }
         if(trans == null || trans.isIdentity()) {
             return drawImage(image, 0, 0, imageObserver);
         }
@@ -459,7 +494,9 @@
         Surface srcSurf = null;
         if(image instanceof OffscreenImage){
             OffscreenImage oi = (OffscreenImage) image;
-            if((oi.getState() & ImageObserver.ERROR) != 0) return false;
+            if((oi.getState() & ImageObserver.ERROR) != 0) {
+                return false;
+            }
             done = oi.prepareImage(imageObserver);
             somebits = (oi.getState() & ImageObserver.SOMEBITS) != 0;
             srcSurf = oi.getImageSurface();
@@ -479,9 +516,11 @@
         return done;
     }
 
+    @Override
     public void drawLine(int x1, int y1, int x2, int y2) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.drawLine("+x1+", "+y1+", "+x2+", "+y2+")");
+        }
 
         if (stroke instanceof BasicStroke && ((BasicStroke)stroke).getLineWidth() <= 1) {
             BasicStroke bstroke = (BasicStroke)stroke;
@@ -497,6 +536,7 @@
         draw(new Line2D.Float(x1, y1, x2, y2));
     }
 
+    @Override
     public void drawOval(int x, int y, int width, int height) {
         if (stroke instanceof BasicStroke && ((BasicStroke)stroke).getLineWidth() <= 1 &&
                 ((BasicStroke)stroke).getDashArray() == null && 
@@ -510,22 +550,28 @@
         draw(new Ellipse2D.Float(x, y, width, height));
     }
 
+    @Override
     public void drawPolygon(int[] xpoints, int[] ypoints, int npoints) {
         draw(new Polygon(xpoints, ypoints, npoints));
     }
 
+    @Override
     public void drawPolygon(Polygon polygon) {
         draw(polygon);
     }
 
+    @Override
     public void drawPolyline(int[] xpoints, int[] ypoints, int npoints) {
-        for (int i = 0; i < npoints-1; i++)
+        for (int i = 0; i < npoints-1; i++) {
             drawLine(xpoints[i], ypoints[i], xpoints[i+1], ypoints[i+1]);
+        }
     }
 
+    @Override
     public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
-        if (img == null)
+        if (img == null) {
             return;
+        }
 
         double scaleX = xform.getScaleX();
         double scaleY = xform.getScaleY();
@@ -540,9 +586,11 @@
         }
     }
 
+    @Override
     public void drawRenderedImage(RenderedImage rimg, AffineTransform xform) {
-        if (rimg == null)
+        if (rimg == null) {
             return;
+        }
 
         Image img = null;
 
@@ -556,9 +604,11 @@
         drawImage(img, xform, null);
     }
 
+    @Override
     public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.drawRoundRect("+x+", "+y+", "+width+", "+height+","+arcWidth+", "+arcHeight+")");
+        }
 
         draw(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
     }
@@ -573,22 +623,27 @@
      *
      ***************************************************************************/
 
+    @Override
     public void drawString(AttributedCharacterIterator iterator, float x, float y) {
         GlyphVector gv = font.createGlyphVector(frc, iterator);
         drawGlyphVector(gv, x, y);
     }
 
+    @Override
     public void drawString(AttributedCharacterIterator iterator, int x, int y) {
         drawString(iterator, (float)x, (float)y);
     }
 
+    @Override
     public void drawString(String str, int x, int y) {
         drawString(str, (float)x, (float)y);
     }
 
+    @Override
     public void drawString(String str, float x, float y) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.drawString("+str+", "+x+", "+y+")");
+        }
 
         AffineTransform at = (AffineTransform)this.getTransform().clone();
         AffineTransform fontTransform = font.getTransform();
@@ -619,6 +674,7 @@
 
     }
 
+    @Override
     public void drawGlyphVector(GlyphVector gv, float x, float y) {
 
         AffineTransform at = gv.getFont().getTransform();
@@ -660,38 +716,47 @@
      *
      ***************************************************************************/
 
+    @Override
     public void fill(Shape s) {
         s = transform.createTransformedShape(s);
         MultiRectArea mra = jsr.rasterize(s, 0.5);
         fillMultiRectArea(mra);
     }
 
+    @Override
     public void fillArc(int x, int y, int width, int height, int sa, int ea) {
         fill(new Arc2D.Float(x, y, width, height, sa, ea, Arc2D.PIE));
     }
 
+    @Override
     public void fillOval(int x, int y, int width, int height) {
         fill(new Ellipse2D.Float(x, y, width, height));
     }
 
+    @Override
     public void fillPolygon(int[] xpoints, int[] ypoints, int npoints) {
         fill(new Polygon(xpoints, ypoints, npoints));
     }
 
+    @Override
     public void fillPolygon(Polygon polygon) {
         fill(polygon);
     }
 
+    @Override
     public void fillRect(int x, int y, int width, int height) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.fillRect("+x+", "+y+", "+width+", "+height+")");
+        }
 
         fill(new Rectangle(x, y, width, height));
     }
 
+    @Override
     public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.fillRoundRect("+x+", "+y+", "+width+", "+height+","+arcWidth+", "+arcHeight+")");
+        }
 
         fill(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
     }
@@ -705,68 +770,85 @@
      *
      ***************************************************************************/
 
+    @Override
     public Color getBackground() {
         return bgColor;
     }
 
+    @Override
     public Shape getClip() {
-        if (clip == null)
+        if (clip == null) {
             return null;
+        }
 
         MultiRectArea res = new MultiRectArea(clip);
         res.translate(-Math.round((float)transform.getTranslateX()), -Math.round((float)transform.getTranslateY()));
         return res;
     }
 
+    @Override
     public Rectangle getClipBounds() {
-        if (clip == null)
+        if (clip == null) {
             return null;
+        }
 
         Rectangle res = (Rectangle) clip.getBounds().clone();
         res.translate(-Math.round((float)transform.getTranslateX()), -Math.round((float)transform.getTranslateY()));
         return res;
     }
 
+    @Override
     public Color getColor() {
         return fgColor;
     }
 
+    @Override
     public Composite getComposite() {
         return composite;
     }
 
+    @Override
     public Font getFont() {
         return font;
     }
 
+    @SuppressWarnings("deprecation")
+    @Override
     public FontMetrics getFontMetrics(Font font) {
         return Toolkit.getDefaultToolkit().getFontMetrics(font);
     }
 
+    @Override
     public FontRenderContext getFontRenderContext() {
         return frc;
     }
 
+    @Override
     public Paint getPaint() {
         return paint;
     }
 
+    @Override
     public Object getRenderingHint(RenderingHints.Key key) {
         return hints.get(key);
     }
 
+    @Override
     public RenderingHints getRenderingHints() {
         return hints;
     }
 
+    @Override
     public Stroke getStroke() {
         return stroke;
     }
 
+    @Override
     public AffineTransform getTransform() {
         return (AffineTransform)transform.clone();
     }
 
+    @Override
     public boolean hit(Rectangle rect, Shape s, boolean onStroke) {
         //TODO: Implement method....
         return false;
@@ -781,42 +863,51 @@
      *
      ***************************************************************************/
 
+    @Override
     public void rotate(double theta) {
         transform.rotate(theta);
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void rotate(double theta, double x, double y) {
         transform.rotate(theta, x, y);
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void scale(double sx, double sy) {
         transform.scale(sx, sy);
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void shear(double shx, double shy) {
         transform.shear(shx, shy);
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void transform(AffineTransform at) {
         transform.concatenate(at);
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void translate(double tx, double ty) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.translate("+tx+", "+ty+")");
+        }
 
         transform.translate(tx, ty);
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void translate(int tx, int ty) {
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.translate("+tx+", "+ty+")");
+        }
 
         transform.translate(tx, ty);
         transform.getMatrix(matrix);
@@ -831,24 +922,29 @@
      *
      ***************************************************************************/
 
+    @Override
     public void setBackground(Color color) {
         bgColor = color;
     }
 
+    @Override
     public void setClip(int x, int y, int width, int height) {
         setClip(new Rectangle(x, y, width, height));
     }
 
+    @Override
     public void setClip(Shape s) {
         if (s == null) {
             setTransformedClip(null);
-            if (debugOutput)
+            if (debugOutput) {
                 System.err.println("CommonGraphics2D.setClip(null)");
+            }
             return;
         }
 
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.setClip("+s.getBounds()+")");
+        }
 
         if (s instanceof MultiRectArea) {
             MultiRectArea nclip = new MultiRectArea((MultiRectArea)s);
@@ -860,48 +956,59 @@
         }
     }
 
+    @Override
     public void setColor(Color color) {
         fgColor = color;
         paint = color;
     }
 
+    @Override
     public void setComposite(Composite composite) {
         this.composite = composite;
     }
 
+    @Override
     public void setFont(Font font) {
         this.font = font;
     }
 
+    @Override
     public void setPaint(Paint paint) {
         this.paint = paint;
-        if (paint instanceof Color)
+        if (paint instanceof Color) {
             fgColor = (Color)paint;
+        }
     }
 
+    @Override
     public void setPaintMode() {
         composite = AlphaComposite.SrcOver;
     }
 
+    @Override
     public void setRenderingHint(RenderingHints.Key key, Object value) {
         hints.put(key, value);
     }
 
+    @Override
     public void setRenderingHints(Map<?,?> hints) {
         this.hints.clear();
         this.hints.putAll(hints);
     }
 
+    @Override
     public void setStroke(Stroke stroke) {
         this.stroke = stroke;
     }
 
+    @Override
     public void setTransform(AffineTransform transform) {
         this.transform = transform;
 
         transform.getMatrix(matrix);
     }
 
+    @Override
     public void setXORMode(Color color) {
         composite = new XORComposite(color);
     }
@@ -919,15 +1026,18 @@
      * @param mra MultiRectArea to fill
      */
     protected void fillMultiRectArea(MultiRectArea mra) {
-        if (clip != null)
+        if (clip != null) {
             mra.intersect(clip);
+        }
 
         // Return if all stuff is clipped
-        if (mra.rect[0] < 5)
+        if (mra.rect[0] < 5) {
             return;
+        }
 
-        if (debugOutput)
+        if (debugOutput) {
             System.err.println("CommonGraphics2D.fillMultiRectArea("+mra+")");
+        }
 
         if (paint instanceof Color){
             fillMultiRectAreaColor(mra);
@@ -954,7 +1064,9 @@
         int y = rec.y;
         int w = rec.width;
         int h = rec.height;
-        if(w <= 0 || h <= 0) return;
+        if(w <= 0 || h <= 0) {
+            return;
+        }
         PaintContext pc = paint.createContext(null, rec, rec, transform, hints);
         Raster r = pc.getRaster(x, y, w, h);
         WritableRaster wr;
@@ -977,10 +1089,11 @@
      * @param copy Graphics class to copy
      */
     protected void copyInternalFields(CommonGraphics2D copy) {
-        if (clip == null)
+        if (clip == null) {
             copy.setTransformedClip(null);
-        else
+        } else {
             copy.setTransformedClip(new MultiRectArea(clip));
+        }
         copy.setBackground(bgColor);
         copy.setColor(fgColor);
         copy.setPaint(paint);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java Mon Sep 18 19:37:41 2006
@@ -19,24 +19,21 @@
  */
 package org.apache.harmony.awt.gl;
 
-
-import java.awt.*;
+import java.awt.Font;
+import java.awt.FontMetrics;
 import java.awt.peer.FontPeer;
-import java.io.IOException;
 
 import org.apache.harmony.awt.gl.font.FontMetricsImpl;
-import org.apache.harmony.awt.gl.font.FontProperty;
 import org.apache.harmony.awt.wtk.GraphicsFactory;
 
-
 /**
  * Common GraphicsFactory implementation
  *
  */
 public abstract class CommonGraphics2DFactory implements GraphicsFactory {
     
-    // static instanse of CommonGraphics2DFactory
-    public static CommonGraphics2DFactory inst = null;
+    // static instance of CommonGraphics2DFactory
+    public static CommonGraphics2DFactory inst;
 
     /**
      * Returns FontMetrics object that keeps metrics of the specified font.
@@ -46,8 +43,8 @@
      */
     public FontMetrics getFontMetrics(Font font) {
         FontMetrics fm;
-        for (int i=0; i < cacheFM.length; i++){
-            fm = cacheFM[i];
+        for (FontMetrics element : cacheFM) {
+            fm = element;
             if (fm == null){
                 break;
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphicsEnvironment.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphicsEnvironment.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphicsEnvironment.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphicsEnvironment.java Mon Sep 18 19:37:41 2006
@@ -28,36 +28,38 @@
 
 import org.apache.harmony.awt.gl.image.BufferedImageGraphics2D;
 
-
 /**
  * Common GraphicsEnvironment implementation
  *
  */
 public abstract class CommonGraphicsEnvironment extends GraphicsEnvironment {
 
+    @Override
     public Graphics2D createGraphics(BufferedImage bufferedImage) {
         return new BufferedImageGraphics2D(bufferedImage);
     }
 
+    @Override
     public String[] getAvailableFontFamilyNames(Locale locale) {
         Font[] fonts = getAllFonts();
-        ArrayList familyNames = new ArrayList();
+        ArrayList<String> familyNames = new ArrayList<String>();
 
-        for (int i=0;i<fonts.length;i++) {
-            String name = fonts[i].getFamily(locale);
+        for (Font element : fonts) {
+            String name = element.getFamily(locale);
             if (!familyNames.contains(name)) {
                 familyNames.add(name);
             }
         }
 
-        String res[] = new String[familyNames.size()];
-        return (String[]) familyNames.toArray(res);
+        return familyNames.toArray(new String[familyNames.size()]);
     }
 
+    @Override
     public Font[] getAllFonts() {
         return CommonGraphics2DFactory.inst.getFontManager().getAllFonts();
     }
 
+    @Override
     public String[] getAvailableFontFamilyNames() {
         return CommonGraphics2DFactory.inst.getFontManager().getAllFamilies();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Crossing.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Crossing.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Crossing.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Crossing.java Mon Sep 18 19:37:41 2006
@@ -40,7 +40,7 @@
     public static final int CROSSING = 255;
     
     /**
-     * Unknown crossing reult
+     * Unknown crossing result
      */
     static final int UNKNOWN = 254;
 
@@ -172,7 +172,6 @@
 
         int cross(double res[], int rc, double py1, double py2) {
             int cross = 0;
-            double edge;
 
             for (int i = 0; i < rc; i++) {
                 double t = res[i];
@@ -183,14 +182,14 @@
                 }
                 // CURVE-START
                 if (t < DELTA) {
-                    if (py1 < 0.0 && (edge = bx != 0.0 ? bx : ax - bx) < 0.0) {
+                    if (py1 < 0.0 && (bx != 0.0 ? bx : ax - bx) < 0.0) {
                         cross--;
                     }
                     continue;
                 }
                 // CURVE-END
                 if (t > 1 - DELTA) {
-                    if (py1 < ay && (edge = ax != bx ? ax - bx : bx) > 0.0) {
+                    if (py1 < ay && (ax != bx ? ax - bx : bx) > 0.0) {
                         cross++;
                     }
                     continue;
@@ -279,8 +278,6 @@
 
         int cross(double res[], int rc, double py1, double py2) {
             int cross = 0;
-            double edge;
-
             for (int i = 0; i < rc; i++) {
                 double t = res[i];
 
@@ -290,14 +287,14 @@
                 }
                 // CURVE-START
                 if (t < DELTA) {
-                    if (py1 < 0.0 && (edge = bx != 0.0 ? bx : (cx != bx ? cx - bx : ax - cx)) < 0.0) {
+                    if (py1 < 0.0 && (bx != 0.0 ? bx : (cx != bx ? cx - bx : ax - cx)) < 0.0) {
                         cross--;
                     }
                     continue;
                 }
                 // CURVE-END
                 if (t > 1 - DELTA) {
-                    if (py1 < ay && (edge = ax != cx ? ax - cx : (cx != bx ? cx - bx : bx)) > 0.0) {
+                    if (py1 < ay && (ax != cx ? ax - cx : (cx != bx ? cx - bx : bx)) > 0.0) {
                         cross++;
                     }
                     continue;
@@ -314,9 +311,8 @@
                         if (rxt < -DELTA || rxt > DELTA) {
                             // Inflection point
                             continue;
-                        } else {
-                            rxt = ax;
                         }
+                        rxt = ax;
                     }
                     cross += rxt > 0.0 ? 1 : -1;
                 }
@@ -417,9 +413,8 @@
         if (y < y1 && y < cy && y < y2 && x != x1 && x != x2) {
             if (x1 < x2) {
                 return x1 < x && x < x2 ? 1 : 0;
-            } else {
-                return x2 < x && x < x1 ? -1 : 0;
             }
+            return x2 < x && x < x1 ? -1 : 0;
         }
 
         // INSIDE
@@ -450,9 +445,8 @@
         if (y < y1 && y < cy1 && y < cy2 && y < y2 && x != x1 && x != x2) {
             if (x1 < x2) {
                 return x1 < x && x < x2 ? 1 : 0;
-            } else {
-                return x2 < x && x < x1 ? -1 : 0;
             }
+            return x2 < x && x < x1 ? -1 : 0;
         }
 
         // INSIDE
@@ -468,42 +462,39 @@
      * Returns how many times ray from point (x,y) cross path
      */
     public static int crossPath(PathIterator p, double x, double y) {
-
-        int count;
         int cross = 0;
         double mx, my, cx, cy;
         mx = my = cx = cy = 0.0;
         double coords[] = new double[6];
 
         while (!p.isDone()) {
-            count = 0;
             switch (p.currentSegment(coords)) {
             case PathIterator.SEG_MOVETO:
                 if (cx != mx || cy != my) {
-                    cross += count = crossLine(cx, cy, mx, my, x, y);
+                    cross += crossLine(cx, cy, mx, my, x, y);
                 }
                 mx = cx = coords[0];
                 my = cy = coords[1];
                 break;
             case PathIterator.SEG_LINETO:
-                cross += count = crossLine(cx, cy, cx = coords[0], cy = coords[1], x, y);
+                cross += crossLine(cx, cy, cx = coords[0], cy = coords[1], x, y);
                 break;
             case PathIterator.SEG_QUADTO:
-                cross += count = crossQuad(cx, cy, coords[0], coords[1], cx = coords[2], cy = coords[3], x, y);
+                cross += crossQuad(cx, cy, coords[0], coords[1], cx = coords[2], cy = coords[3], x, y);
                 break;
             case PathIterator.SEG_CUBICTO:
-                cross += count = crossCubic(cx, cy, coords[0], coords[1], coords[2], coords[3], cx = coords[4], cy = coords[5], x, y);
+                cross += crossCubic(cx, cy, coords[0], coords[1], coords[2], coords[3], cx = coords[4], cy = coords[5], x, y);
                 break;
             case PathIterator.SEG_CLOSE:
                 if (cy != my || cx != mx) {
-                    cross += count = crossLine(cx, cy, cx = mx, cy = my, x, y);
+                    cross += crossLine(cx, cy, cx = mx, cy = my, x, y);
                 }
                 break;
             }
             p.next();
         }
         if (cy != my) {
-            cross += count = crossLine(cx, cy, mx, my, x, y);
+            cross += crossLine(cx, cy, mx, my, x, y);
         }
         return cross;
     }
@@ -531,10 +522,11 @@
     static void sortBound(double bound[], int bc) {
         for(int i = 0; i < bc - 4; i += 4) {
             int k = i;
-            for(int j = i + 4; j < bc; j += 4)
+            for(int j = i + 4; j < bc; j += 4) {
                 if (bound[k] > bound[j]) {
                     k = j;
                 }
+            }
             if (k != i) {
                 double tmp = bound[i];
                 bound[i] = bound[k];
@@ -661,9 +653,8 @@
 
         if (x1 < x2) {
             return x1 < rx1 && rx1 < x2 ? 1 : 0;
-        } else {
-            return x2 < rx1 && rx1 < x1 ? -1 : 0;
         }
+        return x2 < rx1 && rx1 < x1 ? -1 : 0;
 
     }
 
@@ -684,9 +675,8 @@
         if (ry2 < y1 && ry2 < cy && ry2 < y2 && rx1 != x1 && rx1 != x2) {
             if (x1 < x2) {
                 return x1 < rx1 && rx1 < x2 ? 1 : 0;
-            } else {
-                return x2 < rx1 && rx1 < x1 ? -1 : 0;
             }
+            return x2 < rx1 && rx1 < x1 ? -1 : 0;
         }
 
         // INSIDE -------------------------------------------------------------
@@ -756,9 +746,8 @@
         if (ry2 < y1 && ry2 < cy1 && ry2 < cy2 && ry2 < y2 && rx1 != x1 && rx1 != x2) {
             if (x1 < x2) {
                 return x1 < rx1 && rx1 < x2 ? 1 : 0;
-            } else {
-                return x2 < rx1 && rx1 < x1 ? -1 : 0;
             }
+            return x2 < rx1 && rx1 < x1 ? -1 : 0;
         }
 
         // INSIDE
@@ -792,7 +781,7 @@
         bc = c.addBound(bound, bc, res2, rc2, minX, maxX, true, 2);
         rc2 = c.solveExtremY(res2);
         bc = c.addBound(bound, bc, res2, rc2, minX, maxX, true, 4);
-        // Add strat and end
+        // Add start and end
         if (rx1 < x1 && x1 < rx2) {
             bound[bc++] = 0.0;
             bound[bc++] = 0.0;
@@ -896,5 +885,4 @@
     public static boolean isInsideEvenOdd(int cross) {
         return (cross & 1) != 0;
     }
-
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ICompositeContext.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ICompositeContext.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ICompositeContext.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ICompositeContext.java Mon Sep 18 19:37:41 2006
@@ -50,18 +50,21 @@
 
     public void compose(Raster srcIn, Raster dstIn, WritableRaster dstOut) {
 
-        if(!srcCM.isCompatibleRaster(srcIn))
+        if(!srcCM.isCompatibleRaster(srcIn)) {
             throw new IllegalArgumentException("The srcIn raster is " +
                     "incompatible with src ColorModel");
+        }
 
-        if(!dstCM.isCompatibleRaster(dstIn))
+        if(!dstCM.isCompatibleRaster(dstIn)) {
             throw new IllegalArgumentException("The dstIn raster is " +
                     "incompatible with dst ColorModel");
+        }
 
         if(dstIn != dstOut){
-            if(!dstCM.isCompatibleRaster(dstOut))
+            if(!dstCM.isCompatibleRaster(dstOut)) {
                 throw new IllegalArgumentException("The dstOut raster is " +
                         "incompatible with dst ColorModel");
+            }
             dstOut.setDataElements(0, 0, dstIn);
         }
         WritableRaster src;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java Mon Sep 18 19:37:41 2006
@@ -40,7 +40,7 @@
 
 
 /**
- * This class represent Surface for differnt types of Images (BufferedImage, 
+ * This class represent Surface for different types of Images (BufferedImage, 
  * OffscreenImage and so on) 
  */
 public class ImageSurface extends Surface implements DataBufferListener {
@@ -63,9 +63,10 @@
     }
 
     public ImageSurface(ColorModel cm, WritableRaster raster, int type){
-        if (!cm.isCompatibleRaster(raster))
+        if (!cm.isCompatibleRaster(raster)) {
             throw new IllegalArgumentException("The raster is" +
                     " incompatible with this ColorModel");
+        }
         this.cm = cm;
         this.raster = raster;
         surfaceType = type;
@@ -77,7 +78,7 @@
         width = raster.getWidth();
         height = raster.getHeight();
 
-        // For the moment we can blit natively only images which have 
+        // For the moment we can build natively only images which have 
         // sRGB, Linear_RGB, Linear_Gray Color Space and type different
         // from BufferedImage.TYPE_CUSTOM
         if(cs == LUTColorConverter.sRGB_CS){
@@ -96,14 +97,17 @@
         }
     }
 
+    @Override
     public ColorModel getColorModel() {
         return cm;
     }
 
+    @Override
     public WritableRaster getRaster() {
         return raster;
     }
 
+    @Override
     public long getSurfaceDataPtr() {
         if(surfaceDataPtr == 0L && nativeDrawable){
             createSufaceStructure();
@@ -111,14 +115,17 @@
         return surfaceDataPtr;
     }
 
+    @Override
     public Object getData(){
         return data;
     }
 
+    @Override
     public boolean isNativeDrawable(){
         return nativeDrawable;
     }
 
+    @Override
     public int getSurfaceType() {
         return surfaceType;
     }
@@ -208,6 +215,7 @@
                 offset, hasAlpha, isAlphaPre, transparency);
     }
 
+    @Override
     public void dispose() {
         if(surfaceDataPtr != 0L){
             dispose(surfaceDataPtr);
@@ -254,15 +262,18 @@
         this.height = r.getHeight();
     }
 
+    @Override
     public long lock() {
         // TODO
         return 0;
     }
 
+    @Override
     public void unlock() {
         //TODO
     }
 
+    @Override
     public Surface getImageSurface() {
         return this;
     }
@@ -284,13 +295,17 @@
         clearValidCaches();
     }
     
+    @Override
     public void invalidate(){
         needToRefresh = true;
         clearValidCaches();
     }
     
+    @Override
     public void validate(){
-        if(!needToRefresh) return;
+        if(!needToRefresh) {
+            return;
+        }
         if(!dataTaken){
             needToRefresh = false;
             AwtImageBackdoorAccessor ba = AwtImageBackdoorAccessor.getInstance();
@@ -299,6 +314,7 @@
         
     }
     
+    @Override
     public boolean invalidated(){
         return needToRefresh;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/MultiRectArea.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/MultiRectArea.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/MultiRectArea.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/MultiRectArea.java Mon Sep 18 19:37:41 2006
@@ -114,10 +114,9 @@
                         pointIndex += 2;
                         bottomIndex++;
                         continue;
-                    } else {
-                        deleteRect = pointX2 >= bottomX1;
-                        appendRect = pointX1 <= bottomX2;
                     }
+                    deleteRect = pointX2 >= bottomX1;
+                    appendRect = pointX1 <= bottomX2;
                 }
 
                 if (deleteRect) {
@@ -406,18 +405,18 @@
      */
     public MultiRectArea(Rectangle[] buf) {
         this();
-        for(int i = 0; i < buf.length; i++) {
-            add(buf[i]);
+        for (Rectangle element : buf) {
+            add(element);
         }
     }
 
     /**
      * Constructs a new MultiRectArea and append rectangle from array
      */
-    public MultiRectArea(ArrayList buf) {
+    public MultiRectArea(ArrayList<Rectangle> buf) {
         this();
         for(int i = 0; i < buf.size(); i++) {
-            add((Rectangle)buf.get(i));
+            add(buf.get(i));
         }
     }
 
@@ -451,6 +450,7 @@
     /**
      * Tests equals with another object
      */
+    @Override
     public boolean equals(Object obj) {
         if (obj == this) {
             return true;
@@ -506,11 +506,13 @@
         }
 
         // Check override
-        for(int i = 0; i < r.length; i++)
-            for(int j = i + 1; j < r.length; j++)
+        for(int i = 0; i < r.length; i++) {
+            for(int j = i + 1; j < r.length; j++) {
                 if (r[i].intersects(r[j])) {
                     return i;
                 }
+            }
+        }
 
         return -1;
     }
@@ -608,12 +610,12 @@
         } else {
             Rectangle[] rects = mra.getRectangles();
             System.out.println(msg + "(" + rects.length + ")");
-            for(int i = 0; i < rects.length; i++) {
+            for (Rectangle element : rects) {
                 System.out.println(
-                        rects[i].x + "," +
-                        rects[i].y + "," +
-                        (rects[i].x + rects[i].width - 1) + "," +
-                        (rects[i].y + rects[i].height - 1));
+                        element.x + "," +
+                        element.y + "," +
+                        (element.x + element.width - 1) + "," +
+                        (element.y + element.height - 1));
             }
         }
     }
@@ -634,8 +636,8 @@
         }
 
         if (rectangles != null) {
-            for(int i = 0; i < rectangles.length; i++) {
-                rectangles[i].translate(x, y);
+            for (Rectangle element : rectangles) {
+                element.translate(x, y);
             }
         }
     }
@@ -811,6 +813,7 @@
     /**
      * Returns MultiRectArea object converted to string 
      */
+    @Override
     public String toString() {
         int cnt = getRectCount();
         StringBuffer sb = new StringBuffer((cnt << 5) + 128);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Surface.java Mon Sep 18 19:37:41 2006
@@ -96,7 +96,7 @@
      * Caches may check if they are still valid using isCacheValid method.
      * When cache gets data from the surface, it should call addValidCache method of the surface.
      */
-    private ArrayList validCaches = new ArrayList();
+    private final ArrayList<Object> validCaches = new ArrayList<Object>();
 
     public abstract ColorModel getColorModel();
     public abstract WritableRaster getRaster();
@@ -108,7 +108,7 @@
     public abstract long lock();     
     
     /**
-     * Unloc Native Surface data 
+     * Unlock Native Surface data 
      */
     public abstract void unlock();
     
@@ -194,17 +194,14 @@
                             dcm.getBlueMask() == BLUE_MASK) {
                         if (!hasAlpha) {
                             return BufferedImage.TYPE_INT_RGB;
-                        } else {
-                            if (dcm.getAlphaMask() == ALPHA_MASK) {
-                                if (dcm.isAlphaPremultiplied()) {
-                                    return BufferedImage.TYPE_INT_ARGB_PRE;
-                                }else{
-                                    return BufferedImage.TYPE_INT_ARGB;
-                                }
-                            }else{
-                                return BufferedImage.TYPE_CUSTOM;
+                        }
+                        if (dcm.getAlphaMask() == ALPHA_MASK) {
+                            if (dcm.isAlphaPremultiplied()) {
+                                return BufferedImage.TYPE_INT_ARGB_PRE;
                             }
+                            return BufferedImage.TYPE_INT_ARGB;
                         }
+                        return BufferedImage.TYPE_CUSTOM;
                     } else if (dcm.getRedMask() == RED_BGR_MASK &&
                             dcm.getGreenMask() == GREEN_BGR_MASK &&
                             dcm.getBlueMask() == BLUE_BGR_MASK) {
@@ -282,9 +279,8 @@
                 }else{
                     return BufferedImage.TYPE_CUSTOM;
                 }
-            }else{
-                return BufferedImage.TYPE_CUSTOM;
             }
+            return BufferedImage.TYPE_CUSTOM;
         }
         return BufferedImage.TYPE_CUSTOM;
     }
@@ -293,6 +289,7 @@
         return AwtImageBackdoorAccessor.getInstance().getImageSurface(image);
     }
 
+    @Override
     protected void finalize() throws Throwable{
         dispose();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Utils.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Utils.java?view=diff&rev=447684&r1=447683&r2=447684
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Utils.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/Utils.java Mon Sep 18 19:37:41 2006
@@ -55,10 +55,10 @@
             }else{
                 offImg = new OffscreenImage(img.getSource());
             }
-            if(offImg.prepareImage(null))
+            if(offImg.prepareImage(null)) {
                 return offImg.getBufferedImage();
-            else
-                return null;
+            }
+            return null;
         }
     }
 }



Mime
View raw message