harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r465495 [1/5] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common: java/awt/ java/awt/color/ java/awt/datatransfer/ java/awt/dnd/ java/awt/event/ java/awt/font/ java/awt/geom/ java/awt/image/ org/apache/harm...
Date Thu, 19 Oct 2006 05:18:24 GMT
Author: ndbeyer
Date: Wed Oct 18 22:18:19 2006
New Revision: 465495

URL: http://svn.apache.org/viewvc?view=rev&rev=465495
Log:
Cleanup compiler warnings and JUnit API usage.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerOrderFocusTraversalPolicyTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/DimensionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/EventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/LabelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuBarTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MyResourceBundle.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PointTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PolygonTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RectangleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneAdjustableTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollbarTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/SerializeTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextAreaTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/Tools.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/color/ICC_ProfileRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetContextTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InvocationEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/KeyEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/MouseEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/MouseWheelEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/LineBreakMeasurerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextHitInfoTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextLayoutTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextMeasurerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/AffineTransformTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Arc2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Arc2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Arc2DTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/AreaTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/CubicCurve2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/CubicCurve2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/CubicCurve2DTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Ellipse2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Ellipse2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/FlatteningPathIteratorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/GeneralPathTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Line2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Line2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Line2DTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Point2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Point2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Point2DTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RectangularShapeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeProducer.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/BufferedImageFilterTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferByteTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferDoubleTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferFloatTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferIntTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferShortTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferUShortTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/SinglePixelPackedSampleModelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaLineCashTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaRectCashTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTestCase.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/render/JavaBlitterTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/FontRenderContextTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphJustificationInfoTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/GlyphMetricsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ImageGraphicAttributeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/NumericShaperTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/ShapeGraphicAttributeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/tests/java/awt/font/TransformAttributeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/SynchronizerTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java Wed Oct 18 22:18:19 2006
@@ -138,8 +138,8 @@
         BasicStroke bs = createSampleStroke();
         assertTrue("Object isn't equal itself", bs.equals(bs));
         BasicStroke bsa[] = createStrokeArray();
-        for(int i = 0; i < bsa.length; i++) {
-            assertTrue("Different objects are equal", !bs.equals(bsa[i]));
+        for (BasicStroke element : bsa) {
+            assertTrue("Different objects are equal", !bs.equals(element));
         }
     }
 
@@ -147,8 +147,8 @@
         BasicStroke bs = createSampleStroke();
         assertTrue("Hash code isn't equal for the same object", bs.hashCode() == bs.hashCode());
         BasicStroke bsa[] = createStrokeArray();
-        for(int i = 0; i < bsa.length; i++) {
-            assertTrue("Different objects have the same hash code", bs.hashCode() != bsa[i].hashCode());
+        for (BasicStroke element : bsa) {
+            assertTrue("Different objects have the same hash code", bs.hashCode() != element.hashCode());
         }
     }
 
@@ -161,9 +161,9 @@
         } else {
             System.out.println("Golden files folder " + path.getAbsolutePath());
         }
-        for(int i = 0; i < test.length; i++) {
-            if (test[i].indexOf("_d") != -1 && test[i].indexOf("#JAVA") == -1) {
-                check(path.getAbsolutePath() + File.separator + test[i]);
+        for (String element : test) {
+            if (element.indexOf("_d") != -1 && element.indexOf("#JAVA") == -1) {
+                check(path.getAbsolutePath() + File.separator + element);
             }
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerOrderFocusTraversalPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerOrderFocusTraversalPolicyTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerOrderFocusTraversalPolicyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerOrderFocusTraversalPolicyTest.java Wed Oct 18 22:18:19 2006
@@ -21,7 +21,7 @@
 package java.awt;
 
 import junit.framework.TestCase;
-
+@SuppressWarnings("serial")
 public class ContainerOrderFocusTraversalPolicyTest extends TestCase {
     Frame frame;
     SimpleComponent comp1, comp2, comp3;
@@ -32,9 +32,8 @@
 
     public class SimpleComponent extends Component {
     }
-    /*
-     * @see TestCase#setUp()
-     */
+
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         frame = new Frame();
@@ -45,9 +44,7 @@
         cont1 = new SimpleContainer();
     }
 
-    /*
-     * @see TestCase#tearDown()
-     */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (frame != null) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java Wed Oct 18 22:18:19 2006
@@ -21,8 +21,6 @@
 package java.awt;
 
 
-import java.util.Set;
-
 import junit.framework.TestCase;
 
 
@@ -31,13 +29,18 @@
 
     public final void testSetFocusTraversalKeys() {
         try {
-        Button btn = new Button();
-        btn.setFocusTraversalKeys(KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, (Set<AWTKeyStroke>)new Container().getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS));
-        fail("IllegalArgumentException expected");
-    }catch (IllegalArgumentException e) {
-    }
+            Button btn = new Button();
+            btn
+                    .setFocusTraversalKeys(
+                            KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS,
+                            new Container()
+                                    .getFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS));
+            fail("IllegalArgumentException expected");
+        } catch (IllegalArgumentException e) {
+        }
     }
 
+    @SuppressWarnings("serial")
     public final void testAddNotify() {
         Container c1 = new Container(){};
         Container c2 = new Container(){};
@@ -63,8 +66,4 @@
 //        }        
 //        assertTrue("remove(null) throws NPE", npeThrown);
 //    }
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ContainerRTest.class);
-    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/DimensionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/DimensionTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/DimensionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/DimensionTest.java Wed Oct 18 22:18:19 2006
@@ -32,11 +32,13 @@
         serializePath = getSerializePath(Dimension.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         d = new Dimension(2, 3);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         d = null;
         super.tearDown();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/EventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/EventTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/EventTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/EventTest.java Wed Oct 18 22:18:19 2006
@@ -27,6 +27,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
@@ -34,6 +35,7 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -157,7 +159,7 @@
     public final void testShiftDown() {
         Button button = new Button("Test shift down");
         int id = Event.MOUSE_MOVE, x = 20, y = -30;
-        int key = (int) 'a';
+        int key = 'a';
         long when = 32*1048576l;
         int mod = 0;
         Event evt = new Event(button, when, id, x, y, key,

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java Wed Oct 18 22:18:19 2006
@@ -36,6 +36,7 @@
     public static void main(String[] args) {
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         frame = new Frame();
@@ -43,6 +44,7 @@
         fd = new FileDialog(frame);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (frame != null) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutRTest.java Wed Oct 18 22:18:19 2006
@@ -31,6 +31,7 @@
         junit.textui.TestRunner.run(FlowLayoutRTest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         emptyContainer = new Container();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FlowLayoutTest.java Wed Oct 18 22:18:19 2006
@@ -19,7 +19,7 @@
  * @version $Revision$
  */
 package java.awt;
-
+@SuppressWarnings("serial")
 public class FlowLayoutTest extends AWTTestCase {
 
     class TestButton extends Button {
@@ -33,10 +33,11 @@
 
     private final int MIN_SIZE = 50;
     private final int PREF_SIZE = 100;
-    private TestButton b1, b2, b3, b4, b5;
+    private final TestButton b1, b2, b3, b4, b5;
     private FlowLayout layout;
     private Frame frame;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -46,6 +47,7 @@
         frame.setVisible(true);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         frame.dispose();
         super.tearDown();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java Wed Oct 18 22:18:19 2006
@@ -34,11 +34,13 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 //      gp = new GradientPaint();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java Wed Oct 18 22:18:19 2006
@@ -31,6 +31,7 @@
         junit.textui.TestRunner.run(GridBagLayoutRTest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutTest.java Wed Oct 18 22:18:19 2006
@@ -19,7 +19,7 @@
  * @version $Revision$
  */
 package java.awt;
-
+@SuppressWarnings("serial")
 public class GridBagLayoutTest extends AWTTestCase {
 
     public static void main(String[] args) {
@@ -32,7 +32,7 @@
         }
     }
 
-    private TestButton first, second;
+    private final TestButton first, second;
     private GridBagLayout layout;
     private Frame frame;
 
@@ -45,6 +45,7 @@
         second.setFont(new Font("dialog", Font.PLAIN, 50));
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -54,6 +55,7 @@
         frame.setVisible(true);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         frame.dispose();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutRTest.java Wed Oct 18 22:18:19 2006
@@ -31,6 +31,7 @@
         junit.textui.TestRunner.run(GridLayoutRTest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         emptyContainer = new Container();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridLayoutTest.java Wed Oct 18 22:18:19 2006
@@ -22,6 +22,7 @@
 
 public class GridLayoutTest extends AWTTestCase {
 
+    @SuppressWarnings("serial")
     class TestButton extends Button {
         TestButton(String name, Dimension min, Dimension pref) {
             super(name);
@@ -33,10 +34,11 @@
 
     private final int MIN_SIZE = 50;
     private final int PREF_SIZE = 100;
-    private TestButton b1, b2, b3, b4, b5, b6;
+    private final TestButton b1, b2, b3, b4, b5, b6;
     private GridLayout layout;
     private Frame frame;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -46,6 +48,7 @@
         frame.setVisible(true);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         frame.dispose();
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerRTest.java Wed Oct 18 22:18:19 2006
@@ -23,12 +23,13 @@
 import java.awt.event.KeyEvent;
 
 import junit.framework.TestCase;
-
+@SuppressWarnings("serial")
 public class KeyboardFocusManagerRTest extends TestCase {
     Robot robot;
     Frame f;
     KeyboardFocusManager kfm;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         robot = null;
@@ -41,9 +42,7 @@
         kfm = new DefaultKeyboardFocusManager();
     }
 
-    /*
-     * @see TestCase#tearDown()
-     */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (f != null) {
@@ -51,6 +50,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public final void testRedispatchEvent() {
         Component c1 = new Component(){};
         Component c2 = new Component(){};
@@ -94,6 +94,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public final void testClearGlobalFocusOwner() {
         f.setSize(200, 200);
         f.show();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/KeyboardFocusManagerTest.java Wed Oct 18 22:18:19 2006
@@ -24,6 +24,7 @@
 
 package java.awt;
 
+import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
@@ -69,14 +70,14 @@
         junit.textui.TestRunner.run(KeyboardFocusManagerTest.class);
     }
 
+    @SuppressWarnings("serial")
     public class SimpleComponent extends Component {
     }
     class MyKeyboardManager extends DefaultKeyboardFocusManager {
 
     }
-    /*
-     * @see TestCase#setUp()
-     */
+
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         listenerCalled = vlistenerCalled = false;
@@ -92,6 +93,7 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -100,8 +102,8 @@
         if (kfm != null) {
             PropertyChangeListener[] listeners = kfm.getPropertyChangeListeners();
             if (listeners != null) {
-                for(int i = 0; i < listeners.length; i++) {
-                    kfm.removePropertyChangeListener(listeners[i]);
+                for (PropertyChangeListener element : listeners) {
+                    kfm.removePropertyChangeListener(element);
                 }
             }
         }
@@ -111,8 +113,8 @@
         if (kfm != null) {
             VetoableChangeListener[] listeners = kfm.getVetoableChangeListeners();
             if (listeners != null) {
-                for(int i = 0; i < listeners.length; i++) {
-                    kfm.removeVetoableChangeListener(listeners[i]);
+                for (VetoableChangeListener element : listeners) {
+                    kfm.removeVetoableChangeListener(element);
                 }
             }
         }
@@ -401,7 +403,7 @@
         kfm.addPropertyChangeListener(propName, listener);
         listeners = kfm.getPropertyChangeListeners(propName);
         assertEquals(1, listeners.length);
-        Set forSet = new HashSet();
+        Set<AWTKeyStroke> forSet = new HashSet<AWTKeyStroke>();
         forSet.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ENTER, 0));
         kfm.setDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, forSet);
         assertTrue(listenerCalled);
@@ -412,7 +414,7 @@
         kfm.removePropertyChangeListener(propName, listener);
         listeners = kfm.getPropertyChangeListeners(propName);
         assertEquals(0, listeners.length);
-        forSet.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ENTER, KeyEvent.CTRL_DOWN_MASK));
+        forSet.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ENTER, InputEvent.CTRL_DOWN_MASK));
         kfm.setDefaultFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, forSet);
         assertFalse(listenerCalled);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/LabelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/LabelTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/LabelTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/LabelTest.java Wed Oct 18 22:18:19 2006
@@ -31,6 +31,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         label = new Label();
@@ -39,6 +40,7 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java Wed Oct 18 22:18:19 2006
@@ -30,21 +30,13 @@
     private List list;
     private boolean eventProcessed;
 
-    /*
-     * @see TestCase#setUp()
-     */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         list = new List();
         eventProcessed = false;
     }
 
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
 
     private void selectCurrentItem() {
         list.setMultipleMode(true);
@@ -127,6 +119,7 @@
     public final void testProcessEvent() {
         eventProcessed = false;
         list.addKeyListener(new KeyAdapter() {
+            @Override
             public void keyPressed(KeyEvent a0) {
                 eventProcessed = true;
             }
@@ -139,7 +132,7 @@
         assertEquals(0, list.getListeners(KeyListener.class).length);
         KeyAdapter listener = new KeyAdapter(){};
         list.addKeyListener(listener);
-        Class clazz =  KeyListener.class;
+        Class<KeyListener> clazz =  KeyListener.class;
         assertEquals(1, list.getListeners(clazz).length);
         assertEquals(listener, list.getListeners(clazz)[0]);
         list.removeKeyListener(listener);
@@ -352,6 +345,7 @@
         // TODO: deprecated
     }
 
+    @SuppressWarnings("deprecation")
     public final void testDelItems() {
         String item = "item";
         list.add(item);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuBarTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuBarTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuBarTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuBarTest.java Wed Oct 18 22:18:19 2006
@@ -33,6 +33,7 @@
     
     MenuBar mb;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         mb = new MenuBar();
@@ -67,9 +68,9 @@
     }
     
     public void testShortcuts() {
-        Enumeration sh = mb.shortcuts();
+        Enumeration<MenuShortcut> sh = mb.shortcuts();
         assertNotNull(sh);
-        HashSet s = new HashSet();
+        HashSet<MenuShortcut> s = new HashSet<MenuShortcut>();
         while (sh.hasMoreElements()) {
             s.add(sh.nextElement());
         }
@@ -82,7 +83,7 @@
         assertEquals(0, s.size());
     }
 
-    private void checkShortcut(HashSet s, int vkey) {
+    private void checkShortcut(HashSet<MenuShortcut> s, int vkey) {
         MenuShortcut ms = newShortcut(vkey);
         assertTrue(s.contains(ms));
         s.remove(ms);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java Wed Oct 18 22:18:19 2006
@@ -27,7 +27,7 @@
 import java.awt.event.*;
 
 import junit.framework.TestCase;
-
+@SuppressWarnings("serial")
 public class MenuTest extends TestCase {
     public void testAddRemove() {
         Component comp = new Component() {};

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MyResourceBundle.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MyResourceBundle.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MyResourceBundle.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MyResourceBundle.java Wed Oct 18 22:18:19 2006
@@ -25,10 +25,12 @@
 
 public class MyResourceBundle extends ResourceBundle {
 
-    public Enumeration getKeys() {
+    @Override
+    public Enumeration<String> getKeys() {
         return null;
     }
 
+    @Override
     protected Object handleGetObject(String name) {
         if (name == "Orientation") {
             return ComponentOrientation.RIGHT_TO_LEFT;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PointTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PointTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PointTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PointTest.java Wed Oct 18 22:18:19 2006
@@ -29,10 +29,12 @@
         serializePath = getSerializePath(Point.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PolygonTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PolygonTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PolygonTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/PolygonTest.java Wed Oct 18 22:18:19 2006
@@ -36,14 +36,6 @@
         serializePath = getSerializePath(Polygon.class);
     }
 
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
     public void testCreate1() {
         Polygon pg = new Polygon();
         assertEquals(0, pg.npoints);
@@ -147,6 +139,7 @@
         assertEquals(new Rectangle(3, 4, 3, 4), pg.getBounds());
     }
 
+    @SuppressWarnings("deprecation")
     public void testGetBoundingBox() {
         Polygon pg = new Polygon();
         assertEquals(new Rectangle(), pg.getBoundingBox());
@@ -190,6 +183,7 @@
         assertEquals(new int[]{10, 11, 12}, pg.ypoints, 3);
     }
 
+    @SuppressWarnings("deprecation")
     public void testInside() {
         Polygon pg = new Polygon();
         pg.addPoint(1, 2);
@@ -277,6 +271,7 @@
                 new float[]{4, 5, 5, 6, 6, 7});
     }
 
+    @Override
     public String objToStr(Object obj) {
         Polygon p = (Polygon)obj;
         String data = p.npoints + " [";

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RectangleTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RectangleTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RectangleTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RectangleTest.java Wed Oct 18 22:18:19 2006
@@ -34,11 +34,13 @@
         serializePath = getSerializePath(Rectangle.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         r = new Rectangle(1, 2, 3, 4);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         r = null;
         super.tearDown();
@@ -131,6 +133,7 @@
         assertEquals(new Point(5, 6), r.getLocation());
     }
 
+    @SuppressWarnings("deprecation")
     public void testMove() {
         r.move(5, 6);
         assertEquals(new Point(5, 6), r.getLocation());
@@ -145,11 +148,13 @@
         assertEquals(new Rectangle(13, 14, 16, 18), r);
     }
 
+    @SuppressWarnings("deprecation")
     public void testResize() {
         r.resize(5, 6);
         assertEquals(new Rectangle(1, 2, 5, 6), r);
     }
 
+    @SuppressWarnings("deprecation")
     public void testReshape() {
         r.reshape(5, 6, 7, 8);
         assertEquals(new Rectangle(5, 6, 7, 8), r);
@@ -246,6 +251,7 @@
         assertTrue(!r.contains(new Point(6, 0)));
     }
 
+    @SuppressWarnings("deprecation")
     public void testInside() {
         assertTrue(r.inside(2, 3));
         assertTrue(!r.inside(0, 0));
@@ -309,14 +315,14 @@
     }
 
     public void testOutcode() {
-        assertEquals(Rectangle.OUT_LEFT | Rectangle.OUT_TOP,     r.outcode(0, 0));
-        assertEquals(Rectangle.OUT_TOP,                          r.outcode(2, 0));
-        assertEquals(Rectangle.OUT_RIGHT | Rectangle.OUT_TOP,    r.outcode(5, 0));
-        assertEquals(Rectangle.OUT_RIGHT,                        r.outcode(5, 3));
-        assertEquals(Rectangle.OUT_RIGHT | Rectangle.OUT_BOTTOM, r.outcode(5, 7));
-        assertEquals(Rectangle.OUT_BOTTOM,                       r.outcode(2, 7));
-        assertEquals(Rectangle.OUT_LEFT | Rectangle.OUT_BOTTOM,  r.outcode(0, 7));
-        assertEquals(Rectangle.OUT_LEFT,                         r.outcode(0, 3));
+        assertEquals(Rectangle2D.OUT_LEFT | Rectangle2D.OUT_TOP,     r.outcode(0, 0));
+        assertEquals(Rectangle2D.OUT_TOP,                          r.outcode(2, 0));
+        assertEquals(Rectangle2D.OUT_RIGHT | Rectangle2D.OUT_TOP,    r.outcode(5, 0));
+        assertEquals(Rectangle2D.OUT_RIGHT,                        r.outcode(5, 3));
+        assertEquals(Rectangle2D.OUT_RIGHT | Rectangle2D.OUT_BOTTOM, r.outcode(5, 7));
+        assertEquals(Rectangle2D.OUT_BOTTOM,                       r.outcode(2, 7));
+        assertEquals(Rectangle2D.OUT_LEFT | Rectangle2D.OUT_BOTTOM,  r.outcode(0, 7));
+        assertEquals(Rectangle2D.OUT_LEFT,                         r.outcode(0, 3));
         assertEquals(0, r.outcode(2, 3));
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java Wed Oct 18 22:18:19 2006
@@ -20,6 +20,7 @@
  */
 package java.awt;
 
+import java.awt.event.InputEvent;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseAdapter;
@@ -51,6 +52,7 @@
         junit.textui.TestRunner.run(RobotTest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         System.setSecurityManager(null);
@@ -64,6 +66,7 @@
         b = new Button();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (f != null) {
@@ -71,6 +74,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     private void waitForButton() {
         int timeout = 16, time = 0;
         int nAttempts = 10;        
@@ -271,7 +275,8 @@
         waitForButton();
         waitFocus(5000);
         b.addKeyListener(new KeyAdapter() {
-           public void keyPressed(KeyEvent ke) {
+           @Override
+        public void keyPressed(KeyEvent ke) {
                keyEvent = ke;
            }
         });
@@ -307,7 +312,8 @@
         waitForButton();
         waitFocus(5000);
         b.addKeyListener(new KeyAdapter() {
-           public void keyReleased(KeyEvent ke) {
+           @Override
+        public void keyReleased(KeyEvent ke) {
                keyEvent = ke;
            }
         });
@@ -355,12 +361,13 @@
         Point p2 = b.getLocationOnScreen();
         movePointer(p1, p2);
         b.addMouseListener(new MouseAdapter() {
-           public void mousePressed(MouseEvent me) {
+           @Override
+        public void mousePressed(MouseEvent me) {
                mouseEvent = me;
            }
         });
         robot.setAutoDelay(500);
-        int mask = MouseEvent.BUTTON1_MASK;
+        int mask = InputEvent.BUTTON1_MASK;
         robot.mousePress(mask);
         assertNotNull(mouseEvent);
         assertEquals(MouseEvent.MOUSE_PRESSED, mouseEvent.getID());
@@ -380,10 +387,11 @@
         waitForButton();
         Point p1 = MouseInfo.getPointerInfo().getLocation();
         Point p2 = b.getLocationOnScreen();
-        int mask = MouseEvent.BUTTON3_MASK;
+        int mask = InputEvent.BUTTON3_MASK;
         movePointer(p1, p2);
         b.addMouseListener(new MouseAdapter() {
-           public void mouseReleased(MouseEvent me) {
+           @Override
+        public void mouseReleased(MouseEvent me) {
                mouseEvent = me;
            }
         });
@@ -486,6 +494,7 @@
  */
 class MySecurityManager extends SecurityManager {
 
+    @Override
     public void checkPermission(Permission p) {
         if (p.equals(new RuntimePermission("setSecurityManager")) ||
             p.equals(new RuntimePermission("createSecurityManager"))) {
@@ -501,18 +510,22 @@
 
 class PrintDevice extends GraphicsDevice {
 
+    @Override
     public int getType() {
         return GraphicsDevice.TYPE_PRINTER;
     }
 
+    @Override
     public GraphicsConfiguration getDefaultConfiguration() {
         return null;
     }
 
+    @Override
     public GraphicsConfiguration[] getConfigurations() {
         return null;
     }
 
+    @Override
     public String getIDstring() {
         return null;
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneAdjustableTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneAdjustableTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneAdjustableTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneAdjustableTest.java Wed Oct 18 22:18:19 2006
@@ -35,9 +35,8 @@
     private final int HSIZE = 1500;
     private final int VSIZE = 200;
 
-    /*
-     * @see TestCase#setUp()
-     */
+    @SuppressWarnings("deprecation")
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         f = new Frame();
@@ -53,9 +52,7 @@
         f.show();
     }
 
-    /*
-     * @see TestCase#tearDown()
-     */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (f != null) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollPaneTest.java Wed Oct 18 22:18:19 2006
@@ -36,6 +36,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         scrollPane = new ScrollPane();
@@ -44,6 +45,7 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -105,7 +107,7 @@
         });
 
         scrollPane.processEvent(new MouseWheelEvent(scrollPane,
-                                              MouseWheelEvent.MOUSE_WHEEL,
+                                              MouseEvent.MOUSE_WHEEL,
                                               0l, 0, 100, 200, 0, false,
                                               MouseWheelEvent.WHEEL_BLOCK_SCROLL,
                                               10, 10));
@@ -183,7 +185,7 @@
     }
 
     public final void testEventTypeEnabled() {
-        assertTrue(scrollPane.eventTypeEnabled(MouseWheelEvent.MOUSE_WHEEL));
+        assertTrue(scrollPane.eventTypeEnabled(MouseEvent.MOUSE_WHEEL));
         assertFalse(scrollPane.eventTypeEnabled(MouseEvent.MOUSE_PRESSED));
     }
 
@@ -264,10 +266,10 @@
     public final void testSetWheelScrollingEnabled() {
         scrollPane.setWheelScrollingEnabled(false);
         assertFalse(scrollPane.isWheelScrollingEnabled());
-        assertFalse(scrollPane.eventTypeEnabled(MouseWheelEvent.MOUSE_WHEEL));
+        assertFalse(scrollPane.eventTypeEnabled(MouseEvent.MOUSE_WHEEL));
         scrollPane.setWheelScrollingEnabled(true);
         assertTrue(scrollPane.isWheelScrollingEnabled());
-        assertTrue(scrollPane.eventTypeEnabled(MouseWheelEvent.MOUSE_WHEEL));
+        assertTrue(scrollPane.eventTypeEnabled(MouseEvent.MOUSE_WHEEL));
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollbarTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollbarTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollbarTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ScrollbarTest.java Wed Oct 18 22:18:19 2006
@@ -32,20 +32,12 @@
     Scrollbar scrollbar;
     private boolean eventProcessed;
 
-    /*
-     * @see TestCase#setUp()
-     */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         scrollbar = new Scrollbar();
     }
 
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
 
     private void checkScrollbar(int orientation, int value, int visible,
                                 int min, int max, int unitInc, int blockInc) {
@@ -220,6 +212,7 @@
         assertEquals(10, scrollbar.getVisibleAmount());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testGetVisible() {
         assertEquals(10, scrollbar.getVisible());
     }
@@ -241,6 +234,7 @@
         assertEquals(1, scrollbar.getUnitIncrement());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testGetLineIncrement() {
         assertEquals(1, scrollbar.getLineIncrement());
     }
@@ -255,6 +249,7 @@
         assertEquals(unitIncr, scrollbar.getUnitIncrement());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testSetLineIncrement() {
         scrollbar.setLineIncrement(10);
         assertEquals(10, scrollbar.getLineIncrement());
@@ -264,6 +259,7 @@
         assertEquals(10, scrollbar.getBlockIncrement());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testGetPageIncrement() {
         assertEquals(10, scrollbar.getPageIncrement());
     }
@@ -278,6 +274,7 @@
         assertEquals(blockIncr, scrollbar.getBlockIncrement());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testSetPageIncrement() {
         scrollbar.setPageIncrement(3);
         assertEquals(3, scrollbar.getPageIncrement());
@@ -344,7 +341,7 @@
     }
 
     public void testGetListenersClass() {
-        Class cls = AdjustmentListener.class;
+        Class<AdjustmentListener> cls = AdjustmentListener.class;
         assertEquals(0, scrollbar.getListeners(cls).length);
 
         AdjustmentListener listener = new AdjustmentListener() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/SerializeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/SerializeTestCase.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/SerializeTestCase.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/SerializeTestCase.java Wed Oct 18 22:18:19 2006
@@ -35,13 +35,13 @@
     static final String POSTFIX = ".actual";
     static final String FOLDER = "serialization";
 
-    public String serializePath = null;
+    public String serializePath;
 
     public SerializeTestCase(String name) {
         super(name);
     }
 
-    public static String getSerializePath(Class serializeClass) {
+    public static String getSerializePath(Class<?> serializeClass) {
         String path = System.getProperty("TEST_SRC_DIR");
         assertNotNull("Variable TEST_SRC_DIR not defined", path);
         if (!path.endsWith(File.separator)) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextAreaTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextAreaTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextAreaTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextAreaTest.java Wed Oct 18 22:18:19 2006
@@ -25,16 +25,13 @@
 public class TextAreaTest extends TestCase {
     TextArea area;
     Frame frame;
-
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(TextAreaTest.class);
-    }
-
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         area = new TextArea();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if ((frame != null) && frame.isDisplayable()) {
@@ -98,6 +95,7 @@
     /*
      * Test method for 'java.awt.TextArea.minimumSize()'
      */
+    @SuppressWarnings("deprecation")
     public void testMinimumSize() {
         Dimension minSize = new Dimension();
         assertEquals(minSize, area.minimumSize());
@@ -144,6 +142,7 @@
     /*
      * Test method for 'java.awt.TextArea.preferredSize()'
      */
+    @SuppressWarnings("deprecation")
     public void testPreferredSize() {
         Dimension prefSize = new Dimension();
         assertEquals(area.minimumSize(), area.preferredSize());
@@ -269,6 +268,7 @@
     /*
      * Test method for 'java.awt.TextArea.appendText(String)'
      */
+    @SuppressWarnings("deprecation")
     public void testAppendText() {
         String text = "text";
         area.setText(text);
@@ -356,6 +356,7 @@
     /*
      * Test method for 'java.awt.TextArea.insertText(String, int)'
      */
+    @SuppressWarnings("deprecation")
     public void testInsertText() {
         String text = "text";
         area.setText(text);
@@ -369,6 +370,7 @@
     /*
      * Test method for 'java.awt.TextArea.minimumSize(int, int)'
      */
+    @SuppressWarnings("deprecation")
     public void testMinimumSizeIntInt() {
         frame = new Frame();
         frame.add(area);
@@ -382,6 +384,7 @@
     /*
      * Test method for 'java.awt.TextArea.preferredSize(int, int)'
      */
+    @SuppressWarnings("deprecation")
     public void testPreferredSizeIntInt() {
         frame = new Frame();
         frame.add(area);
@@ -411,6 +414,7 @@
     /*
      * Test method for 'java.awt.TextArea.replaceText(String, int, int)'
      */
+    @SuppressWarnings("deprecation")
     public void testReplaceText() {
         String text = "This is old text";
         area.setText(text);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java Wed Oct 18 22:18:19 2006
@@ -43,16 +43,14 @@
 
     }
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(TextComponentTest.class);
-    }
-
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         textComp = new TextField();
         listener = new MyTextListener();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if ((frame != null) && frame.isDisplayable()) {
@@ -144,6 +142,7 @@
     public void testProcessEvent() {
         eventProcessed = false;
         textComp.addKeyListener(new KeyAdapter() {
+            @Override
             public void keyPressed(KeyEvent a0) {
                 eventProcessed = true;
             }
@@ -157,7 +156,7 @@
      * Test method for 'java.awt.TextComponent.getListeners(Class)'
      */
     public void testGetListeners() {
-        Class cls = TextListener.class;
+        Class<TextListener> cls = TextListener.class;
         EventListener[] listeners = textComp.getListeners(cls);
         assertEquals(0, listeners.length);
         textComp.addTextListener(listener);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java Wed Oct 18 22:18:19 2006
@@ -40,16 +40,14 @@
         }
     }
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(TextFieldTest.class);
-    }
-
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         tf = new TextField();
         listener = new MyActionListener();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if ((frame != null) && frame.isDisplayable()) {
@@ -111,6 +109,7 @@
     /*
      * Test method for 'java.awt.TextField.minimumSize()'
      */
+    @SuppressWarnings("deprecation")
     public void testMinimumSize() {
         Dimension minSize = new Dimension();
         assertEquals(minSize, tf.minimumSize());
@@ -149,6 +148,7 @@
     /*
      * Test method for 'java.awt.TextField.preferredSize()'
      */
+    @SuppressWarnings("deprecation")
     public void testPreferredSize() {
         Dimension prefSize = new Dimension();
         assertEquals(tf.minimumSize(), tf.preferredSize());
@@ -169,6 +169,7 @@
     public void testProcessEvent() {
         eventProcessed = false;
         tf.addKeyListener(new KeyAdapter() {
+            @Override
             public void keyTyped(KeyEvent ke) {
                 eventProcessed = true;
             }
@@ -182,7 +183,7 @@
      * Test method for 'java.awt.TextField.getListeners(Class)'
      */
     public void testGetListeners() {
-        Class cls = ActionListener.class;
+        Class<ActionListener> cls = ActionListener.class;
         EventListener[] listeners = tf.getListeners(cls);
         assertEquals(0, listeners.length);
         tf.addActionListener(listener);
@@ -326,6 +327,7 @@
     /*
      * Test method for 'java.awt.TextField.minimumSize(int)'
      */
+    @SuppressWarnings("deprecation")
     public void testMinimumSizeInt() {
         makeDisplayable();
         int cols = 25;
@@ -341,6 +343,7 @@
     /*
      * Test method for 'java.awt.TextField.preferredSize(int)'
      */
+    @SuppressWarnings("deprecation")
     public void testPreferredSizeInt() {
         makeDisplayable();
         int cols = 125;
@@ -396,6 +399,7 @@
     /*
      * Test method for 'java.awt.TextField.setEchoCharacter(char)'
      */
+    @SuppressWarnings("deprecation")
     public void testSetEchoCharacter() {
         char echoChar = '*';
         tf.setEchoCharacter(echoChar);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/Tools.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/Tools.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/Tools.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/Tools.java Wed Oct 18 22:18:19 2006
@@ -24,7 +24,6 @@
 import java.awt.geom.CubicCurve2D;
 import java.awt.geom.GeneralPath;
 import java.awt.geom.Line2D;
-import java.awt.geom.Point2D;
 import java.awt.geom.QuadCurve2D;
 import java.io.FileReader;
 import java.io.FileWriter;
@@ -32,15 +31,8 @@
 import java.io.Reader;
 import java.io.StreamTokenizer;
 import java.io.Writer;
-
-import org.apache.harmony.awt.gl.MultiRectAreaOp;
-
-//import com.sun.image.codec.jpeg.JPEGCodec;
-//import com.sun.image.codec.jpeg.JPEGEncodeParam;
-//import com.sun.image.codec.jpeg.JPEGImageDecoder;
-//import com.sun.image.codec.jpeg.JPEGImageEncoder;
-
 import junit.framework.Assert;
+import org.apache.harmony.awt.gl.MultiRectAreaOp;
 
 public abstract class Tools {
 
@@ -95,7 +87,6 @@
                 StreamTokenizer t = new StreamTokenizer(f);
                 int count = 0;
                 int type = 0;
-                Point2D lp = null;
                 float coords[] = new float[6];
                 while(t.nextToken() != StreamTokenizer.TT_EOF) {
                     switch(t.ttype) {
@@ -266,8 +257,8 @@
             float dash[] = bs.getDashArray();
             if (dash != null) {
                 String str = "";
-                for(int i = 0; i < dash.length; i++) {
-                    str = str + dash[i] + " ";
+                for (float element : dash) {
+                    str = str + element + " ";
                 }
                 f.write("dash " + str + "\n");
                 f.write("phase " + bs.getDashPhase());
@@ -577,12 +568,12 @@
             try {
                 FileWriter f = new FileWriter(fileName);
                 Rectangle[] rect = area.getRectangles();
-                for(int i = 0; i < rect.length; i++) {
+                for (Rectangle element : rect) {
                     f.write(
-                            rect[i].x + "," +
-                            rect[i].y + "," +
-                            (rect[i].width + rect[i].x - 1) + "," +
-                            (rect[i].height + rect[i].y - 1) + "\n");
+                            element.x + "," +
+                            element.y + "," +
+                            (element.width + element.x - 1) + "," +
+                            (element.height + element.y - 1) + "\n");
                 }
                 f.close();
             } catch (IOException e) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowRTest.java Wed Oct 18 22:18:19 2006
@@ -33,6 +33,7 @@
         frm.dispose();
     }
 
+    @SuppressWarnings("deprecation")
     public final void testHide() {
         final Frame f = new Frame();
         f.setSize(100, 100);
@@ -50,7 +51,4 @@
 
     }
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(WindowRTest.class);
-    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/WindowTest.java Wed Oct 18 22:18:19 2006
@@ -22,12 +22,9 @@
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
-import java.util.Collections;
 import java.util.Enumeration;
 import java.util.Locale;
 import java.util.ResourceBundle;
-import java.util.Set;
-
 import junit.framework.TestCase;
 
 public class WindowTest extends TestCase {
@@ -49,9 +46,7 @@
         }
     };
 
-    /*
-     * @see TestCase#setUp()
-     */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         f = new Frame("Window Test");
@@ -59,9 +54,7 @@
         cleanPropertyFields();
     }
 
-    /*
-     * @see TestCase#tearDown()
-     */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
         if (w != null) {
@@ -74,6 +67,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void testSetLocationRelativeTo() {
         Rectangle screenRect = f.getGraphicsConfiguration().getBounds();
         Point centerScreen = screenRect.getLocation();
@@ -96,19 +90,23 @@
 
     }
 
+    @SuppressWarnings("deprecation")
     public final void testApplyResourceBundle() {
         assertNotNull(w);
         assertSame(ComponentOrientation.UNKNOWN, w.getComponentOrientation());
         w.applyResourceBundle( new ResourceBundle() {
 
-            public Enumeration getKeys() {
+            @Override
+            public Enumeration<String> getKeys() {
                 return null;
             }
 
+            @Override
             protected Object handleGetObject(String arg0) {
                 return null;
             }
 
+            @Override
             public Locale getLocale(){
                 return new Locale("ar");
             }
@@ -118,6 +116,7 @@
                    w.getComponentOrientation());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testApplyResourceBundleString() {
         assertNotNull(w);
         assertSame(ComponentOrientation.UNKNOWN, w.getComponentOrientation());
@@ -126,6 +125,7 @@
                    w.getComponentOrientation());
     }
 
+    @SuppressWarnings("deprecation")
     public final void testSetGetCursorType() {
         assertNotNull(f);
         assertEquals(Frame.DEFAULT_CURSOR, f.getCursorType());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/color/ICC_ProfileRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/color/ICC_ProfileRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/color/ICC_ProfileRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/color/ICC_ProfileRTest.java Wed Oct 18 22:18:19 2006
@@ -34,14 +34,10 @@
                         (byte) 0x00,(byte) 0x00,(byte) 0x00,(byte) 0x00,
                         (byte) 0x00,(byte) 0x00,(byte) 0x00,(byte) 0x00};
 
-            ICC_Profile iccp = ICC_Profile.getInstance(ba);
-        } catch (IllegalArgumentException e) {
-        } catch (Exception e) {
+            ICC_Profile.getInstance(ba);
             fail("IllegalArgumentExceptione expected");
+        } catch (IllegalArgumentException e) {
         }
     }
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ICC_ProfileRTest.class);
-    }
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java Wed Oct 18 22:18:19 2006
@@ -33,10 +33,6 @@
     private boolean calledBack;
     private boolean listenerCalled;
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(ClipboardTest.class);
-    }
-
     public final void testClipboard() {
         assertNull(new Clipboard(null).getName());
         assertEquals(new Clipboard("Clipboard").getName(), "Clipboard");
@@ -104,6 +100,7 @@
             }
         };
         StringSelection t = new StringSelection("") {
+            @Override
             public void lostOwnership(Clipboard clipboard, Transferable contents) {
                 calledBack = true;
             }
@@ -138,6 +135,7 @@
         assertEquals(c.getContents(null), s);
     }
 
+    @SuppressWarnings("deprecation")
     public final void testIsDataFlavorAvailable() {
         Clipboard c = new Clipboard("");
         StringSelection s = new StringSelection("");
@@ -148,6 +146,7 @@
         assertFalse(c.isDataFlavorAvailable(new DataFlavor(Rectangle.class, "")));
     }
 
+    @SuppressWarnings("deprecation")
     public final void testGetAvailableDataFlavors() {
         Clipboard c = new Clipboard("");
         StringSelection s = new StringSelection("");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java Wed Oct 18 22:18:19 2006
@@ -64,7 +64,7 @@
         assertTrue(!new DataFlavor("x/y; class=java.util.LinkedList; charset=c1", "").equals(
                 (Object) new DataFlavor("x/y; class=java.util.List; charset=c2", "")));
         assertTrue(!new DataFlavor("z/y; class=java.util.LinkedList", "").equals(
-                (Object) new RuntimeException()));
+                new RuntimeException()));
     }
 
     /*
@@ -279,8 +279,10 @@
 
     public final void testIsRepresentationClassReader() {
         assertTrue(new DataFlavor(new Reader() {
+            @Override
             public void close() throws IOException {
             }
+            @Override
             public int read(char[] arg0, int arg1, int arg2) throws IOException {
                 return 0;
             }
@@ -291,6 +293,7 @@
 
     public final void testIsRepresentationClassInputStream() {
         assertTrue(new DataFlavor(new InputStream() {
+            @Override
             public int read() throws IOException {
                 return 0;
             }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java Wed Oct 18 22:18:19 2006
@@ -83,7 +83,7 @@
 
     public final void testGetFlavorsForNative() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        List list;
+        List<DataFlavor> list;
 
         map.addFlavorForUnencodedNative("1nat1", new DataFlavor("1data1/flavor", "flav1"));
         map.addFlavorForUnencodedNative("1nat1", new DataFlavor("1data2/flavor", "flav2"));
@@ -105,7 +105,7 @@
 
     public final void testGetNativesForFlavor() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        List list;
+        List<String> list;
 
         map.addUnencodedNativeForFlavor(new DataFlavor("2data1/flavor", "flav1"), "2nat1");
         map.addUnencodedNativeForFlavor(new DataFlavor("2data1/flavor", "flav1"), "2nat2");
@@ -127,7 +127,7 @@
 
     public final void testGetFlavorsForNatives() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        Map submap;
+        Map<String, DataFlavor> submap;
 
         map.addFlavorForUnencodedNative("3nat1", new DataFlavor("3data1/flavor", "flav1"));
         map.addFlavorForUnencodedNative("3nat1", new DataFlavor("3data2/flavor", "flav2"));
@@ -146,7 +146,7 @@
 
     public final void testGetNativesForFlavors() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        Map submap;
+        Map<DataFlavor, String> submap;
 
         map.addUnencodedNativeForFlavor(new DataFlavor("4data1/flavor", "flav1"), "4nat1");
         map.addUnencodedNativeForFlavor(new DataFlavor("4data1/flavor", "flav1"), "4nat2");
@@ -165,7 +165,7 @@
 
     public final void testAddUnencodedNativeForFlavor() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        List list;
+        List<String> list;
 
         map.addUnencodedNativeForFlavor(new DataFlavor("5data1/flavor", "flav1"), "5nat1");
         map.addUnencodedNativeForFlavor(new DataFlavor("5data1/flavor", "flav1"), "5nat2");
@@ -179,7 +179,7 @@
 
     public final void testAddFlavorForUnencodedNative() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        List list;
+        List<DataFlavor> list;
 
         map.addFlavorForUnencodedNative("6nat1", new DataFlavor("6data1/flavor", "flav1"));
         map.addFlavorForUnencodedNative("6nat1", new DataFlavor("6data2/flavor", "flav2"));
@@ -193,7 +193,7 @@
 
     public final void testSetNativesForFlavor() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        List list;
+        List<String> list;
 
         map.addUnencodedNativeForFlavor(new DataFlavor("7data1/flavor", "flav1"), "77nat1");
         map.setNativesForFlavor(new DataFlavor("7data1/flavor", "flav1"), new String[] {"7nat10", "7nat11"});
@@ -206,7 +206,7 @@
 
     public final void testSetFlavorsForNative() {
         SystemFlavorMap map = (SystemFlavorMap) SystemFlavorMap.getDefaultFlavorMap();
-        List list;
+        List<DataFlavor> list;
 
         map.addFlavorForUnencodedNative("8nat1", new DataFlavor("88data1/flavor", "flav1"));
         map.setFlavorsForNative("8nat1", new DataFlavor[] {new DataFlavor("8data10/flavor", "flav1"),

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetContextTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetContextTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetContextTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetContextTest.java Wed Oct 18 22:18:19 2006
@@ -152,6 +152,7 @@
             value = v;
         }
         
+        @Override
         public boolean equals(Object obj) {
             if (obj instanceof NotSerializable) {
                 NotSerializable ns = (NotSerializable)obj;
@@ -162,6 +163,7 @@
             return false;
         }
         
+        @Override
         public int hashCode() {
             int h = (name != null) ? name.hashCode() : 8726345;
             return (h^value);
@@ -174,11 +176,13 @@
         junit.textui.TestRunner.run(DropTargetContextTest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         dt = new DropTarget();
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -353,6 +357,7 @@
                 c.getCurrentDataFlavorsAsList().get(0));
     }
 
+    @SuppressWarnings("serial")
     public void testGetComponent() {
         Component comp = new Component() {};
         dt.setComponent(comp);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/dnd/DropTargetTest.java Wed Oct 18 22:18:19 2006
@@ -36,6 +36,7 @@
 /**
  * Unit test for class java.awt.dnd.DropTarget
  */
+@SuppressWarnings("serial")
 public class DropTargetTest extends TestCase {
     
     static class DTL implements DropTargetListener {
@@ -68,11 +69,11 @@
     }
     
     static class FM implements FlavorMap {
-        public Map getFlavorsForNatives(String[] natives) {
-            return new HashMap();
+        public Map<String, DataFlavor> getFlavorsForNatives(String[] natives) {
+            return new HashMap<String, DataFlavor>();
         }
-        public Map getNativesForFlavors(DataFlavor[] flavors) {
-            return new HashMap();
+        public Map<DataFlavor, String> getNativesForFlavors(DataFlavor[] flavors) {
+            return new HashMap<DataFlavor, String>();
         }
     }
     
@@ -84,10 +85,12 @@
             super(c, null);
         }
         
+        @Override
         public void addNotify(ComponentPeer peer) {
             added = true;
             super.addNotify(peer);
         }
+        @Override
         public void removeNotify(ComponentPeer peer) {
             removed = true;
             super.removeNotify(peer);
@@ -98,6 +101,7 @@
         junit.textui.TestRunner.run(DropTargetTest.class);
     }
     
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
@@ -142,6 +146,7 @@
         final Component comp = new Component() {};
         final Point start = new Point(10, 10);
         DropTarget dt = new DropTarget(comp, new DTL()) {
+            @Override
             protected DropTargetAutoScroller createDropTargetAutoScroller(
                     Component c, Point p) {
                 assertSame(comp, c);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputEventTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputEventTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputEventTest.java Wed Oct 18 22:18:19 2006
@@ -24,6 +24,7 @@
 
 import junit.framework.TestCase;
 
+@SuppressWarnings("serial")
 public class InputEventTest extends TestCase {
 
     public final void testInputEvent() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java Wed Oct 18 22:18:19 2006
@@ -24,7 +24,6 @@
 import java.text.AttributedCharacterIterator;
 import java.util.Map;
 import java.util.Set;
-
 import junit.framework.TestCase;
 
 public class InputMethodEventTest extends TestCase {
@@ -173,57 +172,76 @@
         public int getRunStart() {
             return 0;
         }
+
         public int getRunStart(Attribute arg0) {
             return 0;
         }
-        public int getRunStart(Set arg0) {
+
+        public int getRunStart(Set<? extends Attribute> arg0) {
             return 0;
         }
+
         public int getRunLimit() {
             return 0;
         }
+
         public int getRunLimit(Attribute arg0) {
             return 0;
         }
-        public int getRunLimit(Set arg0) {
+
+        public int getRunLimit(Set<? extends Attribute> arg0) {
             return 0;
         }
-        public Map getAttributes() {
+
+        public Set<Attribute> getAllAttributeKeys() {
             return null;
         }
+
         public Object getAttribute(Attribute arg0) {
             return null;
         }
-        public Set getAllAttributeKeys() {
+
+        public Map<Attribute, Object> getAttributes() {
             return null;
         }
+
         public char first() {
             return 0;
         }
+
         public char last() {
             return 0;
         }
+
         public char current() {
             return 0;
         }
+
         public char next() {
             return 0;
         }
+
         public char previous() {
             return 0;
         }
+
         public char setIndex(int arg0) {
             return 0;
         }
+
         public int getBeginIndex() {
             return 0;
         }
+
         public int getEndIndex() {
             return 0;
         }
+
         public int getIndex() {
             return 0;
         }
+
+        @Override
         public Object clone() {
             return null;
         }



Mime
View raw message