harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r464360 - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt: color/ datatransfer/ dnd/ event/ image/ print/
Date Mon, 16 Oct 2006 01:50:28 GMT
Author: ndbeyer
Date: Sun Oct 15 18:50:25 2006
New Revision: 464360

URL: http://svn.apache.org/viewvc?view=rev&rev=464360
Log:
Code cleanup -
* Add missing annotations
* Add if/else braces

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/Clipboard.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DuplicatedPropertiesResourceBundle.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/StringSelection.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/KeyEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseWheelEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/PaintEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/TextEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/WindowEvent.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/AffineTransformOp.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BandCombineOp.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BufferedImageFilter.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ColorModel.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/FilteredImageSource.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/RescaleOp.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/WritableRaster.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Paper.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/color/ICC_ColorSpace.java Sun Oct 15 18:50:25 2006
@@ -64,8 +64,8 @@
     private ICC_Transform toXYZTransform = null;
     private ICC_Transform fromXYZTransform = null;
 
-    private ColorConverter converter = new ColorConverter();
-    private ColorScaler scaler = new ColorScaler();
+    private final ColorConverter converter = new ColorConverter();
+    private final ColorScaler scaler = new ColorScaler();
     private boolean scalingDataLoaded = false;
 
     private ICC_ColorSpace resolvedDeserializedInst;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/Clipboard.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/Clipboard.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/Clipboard.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/Clipboard.java Sun Oct 15 18:50:25 2006
@@ -17,11 +17,13 @@
 
 package java.awt.datatransfer;
 
-import java.awt.*;
+import java.awt.EventQueue;
 import java.io.IOException;
-import java.util.*;
-
-import org.apache.harmony.awt.*;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import org.apache.harmony.awt.ContextStorage;
+import org.apache.harmony.awt.ListenerList;
 import org.apache.harmony.awt.wtk.Synchronizer;
 
 
@@ -33,13 +35,13 @@
 
     private final String name;
     private final FlavorEventProcessor processor;
-    private final ListenerList listeners;
-    private HashSet<DataFlavor> flavors;
-    private Synchronizer awtSynchronizer;
+    private final ListenerList<FlavorListener> listeners;
+    private Set<DataFlavor> flavors;
+    private final Synchronizer awtSynchronizer;
 
     public Clipboard(String name) {
         this.name = name;
-        listeners = new ListenerList();
+        listeners = new ListenerList<FlavorListener>();
         processor = new FlavorEventProcessor();
         flavors = new HashSet<DataFlavor>();
         awtSynchronizer = ContextStorage.getSynchronizer();
@@ -128,7 +130,7 @@
     }
 
     public FlavorListener[] getFlavorListeners() {
-        return (FlavorListener[]) listeners.getUserListeners(new FlavorListener[0]);
+        return listeners.getUserListeners(new FlavorListener[0]);
     }
 
     private void processFlavorEvent(FlavorEvent e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DuplicatedPropertiesResourceBundle.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DuplicatedPropertiesResourceBundle.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DuplicatedPropertiesResourceBundle.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/DuplicatedPropertiesResourceBundle.java Sun Oct 15 18:50:25 2006
@@ -25,7 +25,7 @@
 
 final class DuplicatedPropertiesResourceBundle extends ResourceBundle {
 
-    private Properties properties;
+    private final Properties properties;
 
     public DuplicatedPropertiesResourceBundle(InputStream stream) throws IOException {
         properties = new Properties() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/StringSelection.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/StringSelection.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/StringSelection.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/datatransfer/StringSelection.java Sun Oct 15 18:50:25 2006
@@ -26,7 +26,7 @@
     private static final DataFlavor[] supportedFlavors = { DataFlavor.stringFlavor,
             DataFlavor.plainTextFlavor };
 
-    private String string;
+    private final String string;
 
     public StringSelection(String data) {
         string = data;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/dnd/DragSource.java Sun Oct 15 18:50:25 2006
@@ -56,8 +56,8 @@
     private static DragSource defaultSource;
     private static DragSourceContext curContext;
 
-    private final ListenerList dragSourceListeners;
-    private final ListenerList dragSourceMotionListeners;
+    private final ListenerList<DragSourceListener> dragSourceListeners;
+    private final ListenerList<DragSourceMotionListener> dragSourceMotionListeners;
 
     static {
         if (GraphicsEnvironment.isHeadless()) {
@@ -102,7 +102,7 @@
     }
 
     public static int getDragThreshold() {
-        int threshold = Integer.getInteger("awt.dnd.drag.threshold", -1);
+        int threshold = Integer.getInteger("awt.dnd.drag.threshold", -1).intValue();
 
         if (threshold <= 0) {
             Object val = Toolkit.getDefaultToolkit().getDesktopProperty(
@@ -126,13 +126,12 @@
             throw new HeadlessException();
         }
 
-        dragSourceListeners = new ListenerList();
-        dragSourceMotionListeners = new ListenerList();
+        dragSourceListeners = new ListenerList<DragSourceListener>();
+        dragSourceMotionListeners = new ListenerList<DragSourceMotionListener>();
     }
 
     public DragSourceListener[] getDragSourceListeners() {
-        return (DragSourceListener[])
-                dragSourceListeners.getUserListeners(new DragSourceListener[0]);
+        return dragSourceListeners.getUserListeners(new DragSourceListener[0]);
     }
 
     public void addDragSourceListener(DragSourceListener dsl) {
@@ -144,9 +143,7 @@
     }
 
     public DragSourceMotionListener[] getDragSourceMotionListeners() {
-        return (DragSourceMotionListener[])
-                dragSourceMotionListeners.getUserListeners(
-                        new DragSourceMotionListener[0]);
+        return dragSourceMotionListeners.getUserListeners(new DragSourceMotionListener[0]);
     }
 
     public void addDragSourceMotionListener(DragSourceMotionListener dsml) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ActionEvent.java Sun Oct 15 18:50:25 2006
@@ -72,6 +72,7 @@
         return when;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/AdjustmentEvent.java Sun Oct 15 18:50:25 2006
@@ -75,6 +75,7 @@
         return (Adjustable) source;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ComponentEvent.java Sun Oct 15 18:50:25 2006
@@ -47,6 +47,7 @@
         return (Component) source;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ContainerEvent.java Sun Oct 15 18:50:25 2006
@@ -50,6 +50,7 @@
         return (Container) source;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/FocusEvent.java Sun Oct 15 18:50:25 2006
@@ -59,6 +59,7 @@
         return temporary;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/HierarchyEvent.java Sun Oct 15 18:50:25 2006
@@ -78,6 +78,7 @@
         return changedParent;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputEvent.java Sun Oct 15 18:50:25 2006
@@ -171,10 +171,12 @@
         return when;
     }
 
+    @Override
     public void consume() {
         super.consume();
     }
 
+    @Override
     public boolean isConsumed() {
         return super.isConsumed();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InputMethodEvent.java Sun Oct 15 18:50:25 2006
@@ -105,14 +105,17 @@
         return when;
     }
 
+    @Override
     public void consume() {
         super.consume();
     }
 
+    @Override
     public boolean isConsumed() {
         return super.isConsumed();
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/InvocationEvent.java Sun Oct 15 18:50:25 2006
@@ -108,6 +108,7 @@
         return when;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/ItemEvent.java Sun Oct 15 18:50:25 2006
@@ -59,6 +59,7 @@
         return (ItemSelectable) source;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/KeyEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/KeyEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/KeyEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/KeyEvent.java Sun Oct 15 18:50:25 2006
@@ -488,9 +488,8 @@
 
             if (i == (rawName.length - 1)) {
                 break;
-            } else {
-                name += " ";
             }
+            name += " ";
         }
 
         return name;
@@ -513,9 +512,8 @@
         Field[] allFields = KeyEvent.class.getDeclaredFields();
 
         try {
-            for (int i = 0; i < allFields.length; i++) {
-                Field field = allFields[i];
-                Class ssalc = field.getType();
+            for (Field field : allFields) {
+                Class<?> ssalc = field.getType();
                 int modifiers = field.getModifiers();
 
                 if (ssalc.isPrimitive() && ssalc.getName().equals("int") &&
@@ -534,9 +532,7 @@
         return null;
     }
 
-    /**
-     * @deprecated
-     */
+    @Deprecated
     public KeyEvent(Component src, int id,
                     long when, int modifiers,
                     int keyCode) {
@@ -592,9 +588,8 @@
         return keyLocation;
     }
 
-    /**
-     * @deprecated
-     */
+    @Override
+    @Deprecated
     public void setModifiers(int modifiers) {
         super.setModifiers(modifiers);
     }
@@ -605,6 +600,7 @@
                     (keyCode == VK_CONTROL) || (keyCode == VK_META) || (keyCode == VK_SHIFT)));
     }
 
+    @Override
     public String paramString() {
         /*
          * The format is based on 1.5 release behavior

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseEvent.java Sun Oct 15 18:50:25 2006
@@ -136,6 +136,7 @@
         this.y += y;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseWheelEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseWheelEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseWheelEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/MouseWheelEvent.java Sun Oct 15 18:50:25 2006
@@ -60,6 +60,7 @@
         return (scrollAmount * wheelRotation);
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/PaintEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/PaintEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/PaintEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/PaintEvent.java Sun Oct 15 18:50:25 2006
@@ -51,6 +51,7 @@
         this.updateRect = updateRect;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/TextEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/TextEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/TextEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/TextEvent.java Sun Oct 15 18:50:25 2006
@@ -36,6 +36,7 @@
         super(src, id);
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/WindowEvent.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/WindowEvent.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/WindowEvent.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/event/WindowEvent.java Sun Oct 15 18:50:25 2006
@@ -92,6 +92,7 @@
         return (Window) source;
     }
 
+    @Override
     public String paramString() {
         /* The format is based on 1.5 release behavior 
          * which can be revealed by the following code:

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/AffineTransformOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/AffineTransformOp.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/AffineTransformOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/AffineTransformOp.java Sun Oct 15 18:50:25 2006
@@ -40,7 +40,7 @@
     private RenderingHints hints;
 
     static {
-        // XXX - todo - uncomment
+        // TODO - uncomment
         //System.loadLibrary("imageops");
     }
 
@@ -52,16 +52,18 @@
             Object hint = hints.get(RenderingHints.KEY_INTERPOLATION);
             if (hint != null) {
                 // Nearest neighbor is default
-                if (hint == RenderingHints.VALUE_INTERPOLATION_BILINEAR)
+                if (hint == RenderingHints.VALUE_INTERPOLATION_BILINEAR) {
                     this.iType = TYPE_BILINEAR;
-                else if (hint == RenderingHints.VALUE_INTERPOLATION_BICUBIC)
+                } else if (hint == RenderingHints.VALUE_INTERPOLATION_BICUBIC) {
                     this.iType = TYPE_BICUBIC;
+                }
             } else {
                 hint = hints.get(RenderingHints.KEY_RENDERING);
                 // Determine from rendering quality
-                if (hint == RenderingHints.VALUE_RENDER_QUALITY)
+                if (hint == RenderingHints.VALUE_RENDER_QUALITY) {
                     this.iType = TYPE_BILINEAR;
                 // For speed use nearest neighbor
+                }
             }
         }
     }
@@ -151,24 +153,27 @@
         double dstWidth = newBounds.getX() + newBounds.getWidth();
         double dstHeight = newBounds.getY() + newBounds.getHeight();
 
-        if (dstWidth <= 0 || dstHeight <= 0)
+        if (dstWidth <= 0 || dstHeight <= 0) {
             throw new RasterFormatException(
                     "Transformed width ("+dstWidth+") and " +
                     "height ("+dstHeight+") should be greater than 0"
             );
+        }
 
-        if (destCM != null)
+        if (destCM != null) {
             return new BufferedImage(destCM,
                     destCM.createCompatibleWritableRaster((int)dstWidth, (int)dstHeight),
                     destCM.isAlphaPremultiplied(),
                     null
             );
+        }
 
         ColorModel cm = src.getColorModel();
 
         // Interpolation other than NN doesn't make any sense for index color
-        if (iType != TYPE_NEAREST_NEIGHBOR && cm instanceof IndexColorModel)
+        if (iType != TYPE_NEAREST_NEIGHBOR && cm instanceof IndexColorModel) {
             return new BufferedImage((int)dstWidth, (int)dstHeight, BufferedImage.TYPE_INT_ARGB);
+        }
 
         // OK, we can get source color model
         return new BufferedImage(cm,
@@ -192,8 +197,9 @@
 
 
     public final BufferedImage filter(BufferedImage src, BufferedImage dst) {
-        if (src == dst)
+        if (src == dst) {
             throw new IllegalArgumentException("Source can't be same as the destination");
+        }
 
         ColorModel srcCM = src.getColorModel();
         BufferedImage finalDst = null;
@@ -226,11 +232,12 @@
         }
 
         // Skip alpha channel for TYPE_INT_RGB images
-        if (slowFilter(src.getRaster(), dst.getRaster()) != 0)
+        if (slowFilter(src.getRaster(), dst.getRaster()) != 0) {
             throw new ImagingOpException ("Unable to transform source");
-        // XXX - todo - uncomment
+        // TODO - uncomment
         //if (ippFilter(src.getRaster(), dst.getRaster(), src.getType()) != 0)
             //throw new ImagingOpException ("Unable to transform source");
+        }
 
         if (finalDst != null) {
             Graphics2D g = finalDst.createGraphics();
@@ -244,25 +251,30 @@
     }
 
     public final WritableRaster filter(Raster src, WritableRaster dst) {
-        if (src == dst)
+        if (src == dst) {
             throw new IllegalArgumentException("Source can't be same as the destination");
+        }
 
-        if (dst == null)
+        if (dst == null) {
             dst = createCompatibleDestRaster(src);
-        else if (src.getNumBands() != dst.getNumBands())
+        } else if (src.getNumBands() != dst.getNumBands()) {
             throw new IllegalArgumentException(
                     "Different number of bands in source and destination"
             );
+        }
 
-        if (slowFilter(src, dst) != 0)
+        if (slowFilter(src, dst) != 0) {
             throw new ImagingOpException("Unable to transform source");
-        // XXX - todo - uncomment
+        // TODO - uncomment
         //if (ippFilter(src, dst, BufferedImage.TYPE_CUSTOM) != 0)
         //    throw new ImagingOpException("Unable to transform source");
+        }
 
         return dst;
     }
 
+    // TODO remove when method is used
+    @SuppressWarnings("unused")
     private int ippFilter(Raster src, WritableRaster dst, int imageType) {
         int srcStride, dstStride;
         boolean skipChannel = false;
@@ -304,7 +316,7 @@
                 break;
             }
 
-            case BufferedImage.TYPE_USHORT_GRAY: // XXX - TODO - could be done in native code?
+            case BufferedImage.TYPE_USHORT_GRAY: // TODO - could be done in native code?
             case BufferedImage.TYPE_USHORT_565_RGB:
             case BufferedImage.TYPE_USHORT_555_RGB:
             case BufferedImage.TYPE_BYTE_BINARY: {
@@ -323,12 +335,14 @@
                     if (
                             srcSM.getDataType() != DataBuffer.TYPE_BYTE ||
                             dstSM.getDataType() != DataBuffer.TYPE_BYTE
-                    )
+                    ) {
                         return slowFilter(src, dst);
+                    }
 
                     channels = srcSM.getNumBands(); // Have IPP functions for 1, 3 and 4 channels
-                    if (channels != 1 && channels != 3 && channels != 4)
+                    if (channels != 1 && channels != 3 && channels != 4) {
                         return slowFilter(src, dst);
+                    }
 
                     int dataTypeSize = DataBuffer.getDataTypeSize(srcSM.getDataType()) / 8;
 
@@ -343,29 +357,34 @@
                     SinglePixelPackedSampleModel sppsm2 = (SinglePixelPackedSampleModel) dstSM;
 
                     // No IPP function for this type
-                    if (sppsm1.getDataType() == DataBuffer.TYPE_USHORT)
+                    if (sppsm1.getDataType() == DataBuffer.TYPE_USHORT) {
                         return slowFilter(src, dst);
+                    }
 
                     channels = sppsm1.getNumBands();
                     // Have IPP functions for 1, 3 and 4 channels
-                    if (channels != 1 && channels != 3 && channels != 4)
+                    if (channels != 1 && channels != 3 && channels != 4) {
                         return slowFilter(src, dst);
+                    }
 
                     // Check compatibility of sample models
                     if (
                             sppsm1.getDataType() != sppsm2.getDataType() ||
                             !Arrays.equals(sppsm1.getBitOffsets(), sppsm2.getBitOffsets()) ||
                             !Arrays.equals(sppsm1.getBitMasks(), sppsm2.getBitMasks())
-                    )
+                    ) {
                         return slowFilter(src, dst);
+                    }
 
                     for (int i=0; i<channels; i++) {
-                        if (sppsm1.getSampleSize(i) != 8)
+                        if (sppsm1.getSampleSize(i) != 8) {
                             return slowFilter(src, dst);
+                        }
                     }
 
-                    if (channels == 3) // Process TYPE_INT_RGB as if it has alpha
+                    if (channels == 3) {
                         channels = 4;
+                    }
 
                     int dataTypeSize = DataBuffer.getDataTypeSize(sppsm1.getDataType()) / 8;
 
@@ -417,8 +436,8 @@
     }
 
     private int slowFilter(Raster src, WritableRaster dst) {
-        // XXX - TODO: make correct interpolation
-        // XXX - TODO: what if there are different data types?
+        // TODO: make correct interpolation
+        // TODO: what if there are different data types?
 
         Rectangle srcBounds = src.getBounds();
         Rectangle dstBounds = dst.getBounds();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BandCombineOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BandCombineOp.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BandCombineOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BandCombineOp.java Sun Oct 15 18:50:25 2006
@@ -125,8 +125,9 @@
 
         // XXX - todo
         //if (ippFilter(src, dst) != 0)
-        if (verySlowFilter(src, dst) != 0)
+        if (verySlowFilter(src, dst) != 0) {
             throw new ImagingOpException ("Unable to transform source");
+        }
 
         return dst;
     }
@@ -142,8 +143,9 @@
 
         if (sm instanceof PixelInterleavedSampleModel) {
             // Check PixelInterleavedSampleModel
-            if (sm.getDataType() != DataBuffer.TYPE_BYTE)
+            if (sm.getDataType() != DataBuffer.TYPE_BYTE) {
                 return null;
+            }
 
             ret.channels = sm.getNumBands();
             ret.stride = ((ComponentSampleModel) sm).getScanlineStride();
@@ -154,20 +156,23 @@
             SinglePixelPackedSampleModel sppsm1 = (SinglePixelPackedSampleModel) sm;
 
             ret.channels = sppsm1.getNumBands();
-            if (sppsm1.getDataType() != DataBuffer.TYPE_INT)
+            if (sppsm1.getDataType() != DataBuffer.TYPE_INT) {
                 return null;
+            }
 
             // Check sample models
             for (int i=0; i<ret.channels; i++) {
-                if (sppsm1.getSampleSize(i) != 8)
+                if (sppsm1.getSampleSize(i) != 8) {
                     return null;
+                }
             }
 
             ret.channelsOrder = new int[ret.channels];
             int bitOffsets[] = sppsm1.getBitOffsets();
             for (int i=0; i<ret.channels; i++) {
-                if (bitOffsets[i] % 8 != 0)
+                if (bitOffsets[i] % 8 != 0) {
                     return null;
+                }
 
                 ret.channelsOrder[i] = bitOffsets[i] / 8;
             }
@@ -208,12 +213,14 @@
         int rmxWidth = (srcInfo.channels+1); // width of the reordered matrix
         float reorderedMatrix[] = new float[rmxWidth*dstInfo.channels];
         for (int j=0; j<dstInfo.channels; j++) {
-            if (j >= dstInfo.channelsOrder.length)
+            if (j >= dstInfo.channelsOrder.length) {
                 continue;
+            }
 
             for (int i=0; i<srcInfo.channels; i++) {
-                if (i >= srcInfo.channelsOrder.length)
+                if (i >= srcInfo.channelsOrder.length) {
                     break;
+                }
 
                 reorderedMatrix[dstInfo.channelsOrder[j]*rmxWidth + srcInfo.channelsOrder[i]] =
                         matrix[j][i];
@@ -286,6 +293,8 @@
         return 0;
     }
 
+    //TODO remove when method is used
+    @SuppressWarnings("unused")
     private int ippFilter(Raster src, WritableRaster dst) {
         boolean invertChannels;
         boolean inPlace = (src == dst);
@@ -304,8 +313,9 @@
                   matrix[1][3] == 0 &&
                   matrix[2][3] == 0)
                 )
-        )
+        ) {
             return slowFilter(src, dst);
+        }
 
         SampleModel srcSM = src.getSampleModel();
         SampleModel dstSM = dst.getSampleModel();
@@ -358,8 +368,9 @@
             srcSM instanceof PixelInterleavedSampleModel &&
             dstSM instanceof PixelInterleavedSampleModel
         ) {
-            if (srcBands != 3)
+            if (srcBands != 3) {
                 return slowFilter(src, dst);
+            }
 
             int srcDataType = srcSM.getDataType();
 
@@ -386,8 +397,9 @@
                     pism1.getPixelStride() != 3 ||
                     pism2.getPixelStride() != 3 ||
                     !Arrays.equals(pism1.getBandOffsets(), pism2.getBandOffsets())
-            )
+            ) {
                 return slowFilter(src, dst);
+            }
 
             if (Arrays.equals(pism1.getBandOffsets(), piInvOffsets)) {
                 invertChannels = true;
@@ -436,10 +448,11 @@
                 ippMatrix[i*4+1] = matrix[2-i][1];
                 ippMatrix[i*4+2] = matrix[2-i][0];
 
-                if (mxWidth == 4)
+                if (mxWidth == 4) {
                     ippMatrix[i*4+3] = matrix[2-i][3];
-                else if (mxWidth == 5)
+                } else if (mxWidth == 5) {
                     ippMatrix[i*4+3] = matrix[2-i][4];
+                }
             }
         } else {
             for (int i = 0; i < mxHeight; i++) {
@@ -447,10 +460,11 @@
                 ippMatrix[i*4+1] = matrix[i][1];
                 ippMatrix[i*4+2] = matrix[i][2];
 
-                if (mxWidth == 4)
+                if (mxWidth == 4) {
                     ippMatrix[i*4+3] = matrix[i][3];
-                else if (mxWidth == 5)
+                } else if (mxWidth == 5) {
                     ippMatrix[i*4+3] = matrix[i][4];
+                }
             }
         }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BufferedImageFilter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BufferedImageFilter.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BufferedImageFilter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/BufferedImageFilter.java Sun Oct 15 18:50:25 2006
@@ -55,6 +55,7 @@
         return op;
     }
 
+    @Override
     public void setDimensions(int width, int height) {
         this.width = width;
         this.height = height;
@@ -65,6 +66,7 @@
         }
     }
 
+    @Override
     public void setColorModel(ColorModel model) {
         if (this.cm != null && this.cm != model && raster != null) {
             forceRGB();
@@ -73,6 +75,7 @@
         }
     }
 
+    @Override
     public void setPixels(
             int x, int y, int
             w, int h,
@@ -82,6 +85,7 @@
         setPixels(x, y, w, h, model, pixels, off, scansize, true);
     }
 
+    @Override
     public void setPixels(
             int x, int y,
             int w, int h,
@@ -91,6 +95,7 @@
         setPixels(x, y, w, h, model, pixels, off, scansize, false);
     }
 
+    @Override
     public void imageComplete(int status) {
         if (status == STATICIMAGEDONE || status == SINGLEFRAMEDONE) {
             BufferedImage bim = new BufferedImage(cm, raster, cm.isAlphaPremultiplied, null);
@@ -172,13 +177,12 @@
                     //bData = new byte[width*height];
                     canArraycopy = !forcedRGB;
                     break;
-                } else {
-                    transferType = DataBuffer.TYPE_INT;
-                    createRaster(transferType);
-                    //iData = new int[width*height];
-                    canArraycopy = !forcedRGB || model.equals(ColorModel.getRGBdefault());
-                    break;
                 }
+                transferType = DataBuffer.TYPE_INT;
+                createRaster(transferType);
+                //iData = new int[width*height];
+                canArraycopy = !forcedRGB || model.equals(ColorModel.getRGBdefault());
+                break;
             } // And proceed to copy the pixels
             case DataBuffer.TYPE_INT: {
                 if (isByteData) { // There are int data already but the new data are bytes

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ColorModel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ColorModel.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ColorModel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ColorModel.java Sun Oct 15 18:50:25 2006
@@ -539,6 +539,7 @@
         }
     }
 
+    @Override
     public void finalize() {
         // This method is added for the API compatibility
         // Don't need to call super since Object's finalize is always empty

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/ConvolveOp.java Sun Oct 15 18:50:25 2006
@@ -41,7 +41,7 @@
     private RenderingHints rhs = null;
 
     static {
-        // XXX - todo
+        // TODO
         //System.loadLibrary("imageops");
     }
 
@@ -90,11 +90,13 @@
     }
 
     public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM) {
-        if (dstCM == null)
+        if (dstCM == null) {
             dstCM = src.getColorModel();
+        }
 
-        if (dstCM instanceof IndexColorModel)
+        if (dstCM instanceof IndexColorModel) {
             dstCM = ColorModel.getRGBdefault();
+        }
 
         WritableRaster r =
                 dstCM.isCompatibleSampleModel(src.getSampleModel()) ?
@@ -127,10 +129,11 @@
             );
         }
 
-        // XXX - todo
+        // TODO
         //if (ippFilter(src, dst, BufferedImage.TYPE_CUSTOM) != 0)
-            if (slowFilter(src, dst) != 0)
+            if (slowFilter(src, dst) != 0) {
                 throw new ImagingOpException ("Unable to transform source");
+            }
 
         return dst;
     }
@@ -270,10 +273,11 @@
         }
 
         // Skip alpha channel for TYPE_INT_RGB images
-        // XXX - todo
+        // TODO
         //if (ippFilter(src.getRaster(), dst.getRaster(), src.getType()) != 0)
-            if (slowFilter(src.getRaster(), dst.getRaster()) != 0)
+            if (slowFilter(src.getRaster(), dst.getRaster()) != 0) {
                 throw new ImagingOpException ("Unable to transform source");
+            }
 
         if (finalDst != null) {
             Graphics2D g = finalDst.createGraphics();
@@ -286,6 +290,8 @@
         return finalDst;
     }
 
+    // TODO remove when this method is used
+    @SuppressWarnings("unused")
     private int ippFilter(Raster src, WritableRaster dst, int imageType) {
         int srcStride, dstStride;
         boolean skipChannel = false;
@@ -326,7 +332,7 @@
                 break;
             }
 
-            case BufferedImage.TYPE_USHORT_GRAY: // XXX - TODO - could be done in native code?
+            case BufferedImage.TYPE_USHORT_GRAY: // TODO - could be done in native code?
             case BufferedImage.TYPE_USHORT_565_RGB:
             case BufferedImage.TYPE_USHORT_555_RGB:
             case BufferedImage.TYPE_BYTE_BINARY: {
@@ -345,12 +351,14 @@
                     if (
                             srcSM.getDataType() != DataBuffer.TYPE_BYTE ||
                             dstSM.getDataType() != DataBuffer.TYPE_BYTE
-                    )
+                    ) {
                         return slowFilter(src, dst);
+                    }
 
                     channels = srcSM.getNumBands(); // Have IPP functions for 1, 3 and 4 channels
-                    if (!(channels == 1 || channels == 3 || channels == 4))
+                    if (!(channels == 1 || channels == 3 || channels == 4)) {
                         return slowFilter(src, dst);
+                    }
 
                     srcStride = ((ComponentSampleModel) srcSM).getScanlineStride();
                     dstStride = ((ComponentSampleModel) dstSM).getScanlineStride();
@@ -369,19 +377,22 @@
                             sppsm1.getDataType() != DataBuffer.TYPE_INT ||
                             sppsm2.getDataType() != DataBuffer.TYPE_INT ||
                             !(channels == 3 || channels == 4)
-                    )
+                    ) {
                         return slowFilter(src, dst);
+                    }
 
                     // Check compatibility of sample models
                     if (
                             !Arrays.equals(sppsm1.getBitOffsets(), sppsm2.getBitOffsets()) ||
                             !Arrays.equals(sppsm1.getBitMasks(), sppsm2.getBitMasks())
-                    )
+                    ) {
                         return slowFilter(src, dst);
+                    }
 
                     for (int i=0; i<channels; i++) {
-                        if (sppsm1.getSampleSize(i) != 8)
+                        if (sppsm1.getSampleSize(i) != 8) {
                             return slowFilter(src, dst);
+                        }
                     }
 
                     if (channels == 3) { // Cannot skip channel, don't know which is alpha...

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/CropImageFilter.java Sun Oct 15 18:50:25 2006
@@ -24,7 +24,7 @@
 
 public class CropImageFilter extends ImageFilter {
 
-    private int X, Y, WIDTH, HEIGHT;
+    private final int X, Y, WIDTH, HEIGHT;
 
     public CropImageFilter(int x, int y, int w, int h) {
         X = x;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/FilteredImageSource.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/FilteredImageSource.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/FilteredImageSource.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/FilteredImageSource.java Sun Oct 15 18:50:25 2006
@@ -25,10 +25,10 @@
 
 public class FilteredImageSource implements ImageProducer {
 
-    private ImageProducer source;
-    private ImageFilter filter;
+    private final ImageProducer source;
+    private final ImageFilter filter;
 
-    private Hashtable<ImageConsumer, ImageConsumer> consTable = new Hashtable<ImageConsumer, ImageConsumer>();
+    private final Hashtable<ImageConsumer, ImageConsumer> consTable = new Hashtable<ImageConsumer, ImageConsumer>();
 
     public FilteredImageSource(ImageProducer orig, ImageFilter imgf) {
         source = orig;
@@ -36,7 +36,9 @@
     }
 
     public synchronized boolean isConsumer(ImageConsumer ic) {
-        if(ic != null) return consTable.containsKey(ic);
+        if(ic != null) {
+            return consTable.containsKey(ic);
+        }
         return false;
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/Kernel.java Sun Oct 15 18:50:25 2006
@@ -24,8 +24,8 @@
 package java.awt.image;
 
 public class Kernel implements Cloneable {
-    private int xOrigin;
-    private int yOrigin;
+    private final int xOrigin;
+    private final int yOrigin;
     private int width;
     private int height;
     float data[];

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupOp.java Sun Oct 15 18:50:25 2006
@@ -31,13 +31,16 @@
 import org.apache.harmony.awt.gl.AwtImageBackdoorAccessor;
 
 public class LookupOp implements BufferedImageOp, RasterOp {
-    private LookupTable lut;
+    private final LookupTable lut;
     private RenderingHints hints;
-    private boolean canUseIpp;
+    
+    // TODO remove when this field is used
+    @SuppressWarnings("unused")
+    private final boolean canUseIpp;
 
     // We don't create levels/values when it is possible to reuse old
-    private int cachedLevels[] = null;
-    private int cachedValues[] = null;
+    private int cachedLevels[];
+    private int cachedValues[];
     // Number of channels for which cache is valid.
     // If negative number of channels is same as positive but skipAlpha was specified
     private int validForChannels;
@@ -45,7 +48,7 @@
     static int levelInitializer[] = new int[0x10000];
 
     static {
-        // XXX - todo
+        // TODO
         // System.loadLibrary("imageops");
 
         for (int i=1; i<=0x10000; i++) {
@@ -141,10 +144,11 @@
             );
         }
 
-        // XXX - todo
+        // TODO
         // if (!canUseIpp || ippFilter(src, dst, BufferedImage.TYPE_CUSTOM, false) != 0)
-            if (slowFilter(src, dst, false) != 0)
+            if (slowFilter(src, dst, false) != 0) {
                 throw new ImagingOpException ("Unable to transform source");
+            }
 
         return dst;
     }
@@ -152,10 +156,11 @@
     public final BufferedImage filter(BufferedImage src, BufferedImage dst) {
         ColorModel srcCM = src.getColorModel();
 
-        if (srcCM instanceof IndexColorModel)
+        if (srcCM instanceof IndexColorModel) {
             throw new IllegalArgumentException(
                     "Source should not have IndexColorModel"
             );
+        }
 
         // Check if the number of scaling factors matches the number of bands
         int nComponents = srcCM.getNumComponents();
@@ -198,10 +203,11 @@
             }
         }
 
-        // XXX - todo
+        // TODO
         //if (!canUseIpp || ippFilter(src.getRaster(), dst.getRaster(), src.getType(), skipAlpha) != 0)
-            if (slowFilter(src.getRaster(), dst.getRaster(), skipAlpha) != 0)
+            if (slowFilter(src.getRaster(), dst.getRaster(), skipAlpha) != 0) {
                 throw new ImagingOpException ("Unable to transform source");
+            }
 
         if (finalDst != null) {
             Graphics2D g = finalDst.createGraphics();
@@ -301,8 +307,9 @@
 
             // Skip last channel if needed, zero values are OK -
             // no changes to the channel information will be done in IPP
-            if ((channelOffset == channels-1 && skipAlpha) || (dataIdx >= data.length))
+            if ((channelOffset == channels-1 && skipAlpha) || (dataIdx >= data.length)) {
                 continue;
+            }
 
             System.arraycopy(levelInitializer, offset, levels, channelBase, nLevels);
             for (int from=0, to=channelBase; from<nLevels; from++, to++) {
@@ -327,8 +334,9 @@
 
             // Skip last channel if needed, zero values are OK -
             // no changes to the channel information will be done in IPP
-            if ((channelOffset == channels-1 && skipAlpha) || (dataIdx >= data.length))
+            if ((channelOffset == channels-1 && skipAlpha) || (dataIdx >= data.length)) {
                 continue;
+            }
 
             int channelBase = nLevels * channelOffset;
             System.arraycopy(levelInitializer, offset, levels, channelBase, nLevels);
@@ -338,6 +346,8 @@
         }
     }
 
+    // TODO remove when this method is used
+    @SuppressWarnings("unused")
     private final int ippFilter(
             Raster src, WritableRaster dst,
             int imageType, boolean skipAlpha
@@ -403,13 +413,15 @@
                     if (
                             srcSM.getDataType() != DataBuffer.TYPE_BYTE ||
                             dstSM.getDataType() != DataBuffer.TYPE_BYTE
-                    )
+                    ) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     // Have IPP functions for 1, 3 and 4 channels
                     channels = srcSM.getNumBands();
-                    if (!(channels == 1 || channels == 3 || channels == 4))
+                    if (!(channels == 1 || channels == 3 || channels == 4)) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     srcStride = ((ComponentSampleModel) srcSM).getScanlineStride();
                     dstStride = ((ComponentSampleModel) dstSM).getScanlineStride();
@@ -432,19 +444,22 @@
                             sppsm1.getDataType() != DataBuffer.TYPE_INT ||
                             sppsm2.getDataType() != DataBuffer.TYPE_INT ||
                             !(channels == 3 || channels == 4)
-                    )
+                    ) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     // Check compatibility of sample models
                     if (
                             !Arrays.equals(sppsm1.getBitOffsets(), sppsm2.getBitOffsets()) ||
                             !Arrays.equals(sppsm1.getBitMasks(), sppsm2.getBitMasks())
-                    )
+                    ) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     for (int i=0; i<channels; i++) {
-                        if (sppsm1.getSampleSize(i) != 8)
+                        if (sppsm1.getSampleSize(i) != 8) {
                             return slowFilter(src, dst, skipAlpha);
+                        }
                     }
 
                     channelsOrder = new int[channels];

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/LookupTable.java Sun Oct 15 18:50:25 2006
@@ -28,14 +28,16 @@
     private int numComponents;
 
     protected LookupTable(int offset, int numComponents) {
-        if (offset < 0)
+        if (offset < 0) {
             throw new IllegalArgumentException(
                     "Offset should be not less than zero"
             );
-        if (numComponents < 1)
+        }
+        if (numComponents < 1) {
             throw new IllegalArgumentException(
                     "Number of components should be positive"
             );
+        }
 
         this.offset = offset;
         this.numComponents = numComponents;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/RescaleOp.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/RescaleOp.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/RescaleOp.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/RescaleOp.java Sun Oct 15 18:50:25 2006
@@ -32,22 +32,23 @@
 
 
 public class RescaleOp implements BufferedImageOp, RasterOp {
-    private float scaleFactors[] = null;
-    private float offsets[] = null;
-    private RenderingHints hints = null;
+    private float scaleFactors[];
+    private float offsets[];
+    private RenderingHints hints;
 
     static {
-        // XXX - todo
+        // TODO
         //System.loadLibrary("imageops");
     }
 
     public RescaleOp(float[] scaleFactors, float[] offsets, RenderingHints hints) {
         int numFactors = Math.min(scaleFactors.length, offsets.length);
 
-        if (numFactors == 0)
+        if (numFactors == 0) {
             throw new IllegalArgumentException(
                     "The number of scale factors should not be zero"
             );
+        }
 
         this.scaleFactors = new float[numFactors];
         this.offsets = new float[numFactors];
@@ -116,11 +117,13 @@
     }
 
     public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM) {
-        if (dstCM == null)
+        if (dstCM == null) {
             dstCM = src.getColorModel();
+        }
 
-        if (dstCM instanceof IndexColorModel)
+        if (dstCM instanceof IndexColorModel) {
             dstCM = ColorModel.getRGBdefault();
+        }
 
         WritableRaster r =
                 dstCM.isCompatibleSampleModel(src.getSampleModel()) ?
@@ -159,10 +162,11 @@
             );
         }
 
-        // XXX - todo
+        // TODO
         //if (ippFilter(src, dst, BufferedImage.TYPE_CUSTOM, false) != 0)
-            if (slowFilter(src, dst, false) != 0)
+            if (slowFilter(src, dst, false) != 0) {
                 throw new ImagingOpException ("Unable to transform source");
+            }
 
         return dst;
     }
@@ -267,8 +271,9 @@
     public final BufferedImage filter(BufferedImage src, BufferedImage dst) {
         ColorModel srcCM = src.getColorModel();
 
-        if (srcCM instanceof IndexColorModel)
+        if (srcCM instanceof IndexColorModel) {
             throw new IllegalArgumentException("Source should not have IndexColorModel");
+        }
 
         // Check if the number of scaling factors matches the number of bands
         int nComponents = srcCM.getNumComponents();
@@ -308,10 +313,11 @@
             }
         }
 
-        // XXX - todo
+        // TODO
         //if (ippFilter(src.getRaster(), dst.getRaster(), src.getType(), skipAlpha) != 0)
-            if (slowFilter(src.getRaster(), dst.getRaster(), skipAlpha) != 0)
+            if (slowFilter(src.getRaster(), dst.getRaster(), skipAlpha) != 0) {
                 throw new ImagingOpException ("Unable to transform source");
+            }
 
         if (finalDst != null) {
             Graphics2D g = finalDst.createGraphics();
@@ -351,7 +357,7 @@
             extOffsets[numBands-1] = 0;
         }
 
-        // Creata levels
+        // Create a levels
         for (int i=0; i<numBands; i++) {
             if (extScaleFactors[i] == 0) {
                 levels[i*4] = 0;
@@ -411,6 +417,8 @@
         }
     }
 
+    // TODO remove when this method is used
+    @SuppressWarnings("unused")
     private final int ippFilter(
             Raster src, WritableRaster dst,
             int imageType, boolean skipAlpha
@@ -476,12 +484,14 @@
                     if (
                             srcSM.getDataType() != DataBuffer.TYPE_BYTE ||
                             dstSM.getDataType() != DataBuffer.TYPE_BYTE
-                    )
+                    ) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     channels = srcSM.getNumBands(); // Have IPP functions for 1, 3 and 4 channels
-                    if (!(channels == 1 || channels == 3 || channels == 4))
+                    if (!(channels == 1 || channels == 3 || channels == 4)) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     srcStride = ((ComponentSampleModel) srcSM).getScanlineStride();
                     dstStride = ((ComponentSampleModel) dstSM).getScanlineStride();
@@ -502,19 +512,22 @@
                             sppsm1.getDataType() != DataBuffer.TYPE_INT ||
                             sppsm2.getDataType() != DataBuffer.TYPE_INT ||
                             !(channels == 3 || channels == 4)
-                    )
+                    ) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     // Check compatibility of sample models
                     if (
                             !Arrays.equals(sppsm1.getBitOffsets(), sppsm2.getBitOffsets()) ||
                             !Arrays.equals(sppsm1.getBitMasks(), sppsm2.getBitMasks())
-                    )
+                    ) {
                         return slowFilter(src, dst, skipAlpha);
+                    }
 
                     for (int i=0; i<channels; i++) {
-                        if (sppsm1.getSampleSize(i) != 8)
+                        if (sppsm1.getSampleSize(i) != 8) {
                             return slowFilter(src, dst, skipAlpha);
+                        }
                     }
 
                     channelsOrder = new int[channels];

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/WritableRaster.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/WritableRaster.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/WritableRaster.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/image/WritableRaster.java Sun Oct 15 18:50:25 2006
@@ -55,38 +55,46 @@
 
     public WritableRaster createWritableChild(int parentX, int parentY, int w,
             int h, int childMinX, int childMinY, int bandList[]) {
-        if (w <= 0 || h <= 0)
+        if (w <= 0 || h <= 0) {
             throw new RasterFormatException("Width or Height of child " +
                     "Raster is less than or equal to zero");
+        }
 
-        if (parentX < this.minX || parentX + w > this.minX + this.width)
+        if (parentX < this.minX || parentX + w > this.minX + this.width) {
             throw new RasterFormatException("parentX disposes outside Raster");
+        }
 
-        if (parentY < this.minY || parentY + h > this.minY + this.height)
+        if (parentY < this.minY || parentY + h > this.minY + this.height) {
             throw new RasterFormatException("parentY disposes outside Raster");
+        }
 
-        if ((long) parentX + w > Integer.MAX_VALUE)
+        if ((long) parentX + w > Integer.MAX_VALUE) {
             throw new RasterFormatException("parentX + w results in " +
                     "integer overflow");
+        }
 
-        if ((long) parentY + h > Integer.MAX_VALUE)
+        if ((long) parentY + h > Integer.MAX_VALUE) {
             throw new RasterFormatException("parentY + h results in " +
                     "integer overflow");
+        }
 
-        if ((long) childMinX + w > Integer.MAX_VALUE)
+        if ((long) childMinX + w > Integer.MAX_VALUE) {
             throw new RasterFormatException("childMinX + w results in " +
                     "integer overflow");
+        }
 
-        if ((long) childMinY + h > Integer.MAX_VALUE)
+        if ((long) childMinY + h > Integer.MAX_VALUE) {
             throw new RasterFormatException("childMinY + h results in " +
                     "integer overflow");
+        }
 
         SampleModel childModel;
 
-        if (bandList == null)
+        if (bandList == null) {
             childModel = sampleModel;
-        else
+        } else {
             childModel = sampleModel.createSubsetSampleModel(bandList);
+        }
 
         int childTranslateX = childMinX - parentX;
         int childTranslateY = childMinY - parentY;
@@ -146,8 +154,9 @@
             h -= maxOffY;
         }
 
-        if (w <= 0 || h <= 0)
+        if (w <= 0 || h <= 0) {
             return;
+        }
 
         switch (sampleModel.getDataType()) {
         case DataBuffer.TYPE_BYTE:
@@ -190,9 +199,10 @@
         int h = inRaster.getHeight();
 
         if (dstX < this.minX || dstX + w > this.minX + this.width ||
-                dstY < this.minY || dstY + h > this.minY + this.height)
+                dstY < this.minY || dstY + h > this.minY + this.height) {
             throw new ArrayIndexOutOfBoundsException("Coordinates are " +
                     "not in bounds");
+        }
 
         int srcX = inRaster.getMinX();
         int srcY = inRaster.getMinY();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Book.java Sun Oct 15 18:50:25 2006
@@ -24,12 +24,12 @@
 
 public class Book implements Pageable {
 
-    private Vector<innerPage> bookPages;
+    private final Vector<innerPage> bookPages;
 
     // innerPage -  class to describe inner structure of Book
     private class innerPage {
-        private PageFormat pageFormat;
-        private Printable pagePainter;
+        private final PageFormat pageFormat;
+        private final Printable pagePainter;
 
         /* constructor */
         innerPage(Printable painter, PageFormat page) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Paper.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Paper.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Paper.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/Paper.java Sun Oct 15 18:50:25 2006
@@ -26,7 +26,7 @@
 
     private double paperHeight;
     private double paperWidth;
-    private Rectangle2D.Double paperImageableArea;
+    private final Rectangle2D.Double paperImageableArea;
 
     private static final double INCH = 72D;    // inch in pixels
     private static final double INCH2 = 144D;  // double inch

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java?view=diff&rev=464360&r1=464359&r2=464360
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/print/PrinterJob.java Sun Oct 15 18:50:25 2006
@@ -90,11 +90,10 @@
         /* This code has been developed according to API documentation
          * for Priviledged Blocks. 
          */
-        return (PrinterJob) AccessController.doPrivileged(
-                new PrivilegedAction() {
-            public Object run() {
-                String s;
-                s = System.getProperty("java.awt.printerjob");
+        return AccessController.doPrivileged(
+                new PrivilegedAction<PrinterJob>() {
+            public PrinterJob run() {
+                String s = System.getProperty("java.awt.printerjob");
 
                 if (s == null || s.equals("")){
                     s = "org.apache.harmony.x.print.awt.PSPrinterJob";
@@ -171,6 +170,5 @@
         }
         return pageDialog(defaultPage());
     }
-
 
 }



Mime
View raw message