harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479418 [4/43] - in /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common: javax/swing/ javax/swing/border/ javax/swing/colorchooser/ javax/swing/event/ javax/swing/filechooser/ javax/swing/plaf/ javax/swing/plaf/basic/ ja...
Date Sun, 26 Nov 2006 20:15:55 GMT
Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/AncestorEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/AncestorEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/AncestorEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/AncestorEventTest.java Sun Nov 26 12:15:43 2006
@@ -23,7 +23,6 @@
 import java.awt.Component;
 import java.awt.event.ComponentEvent;
 import java.awt.event.ComponentListener;
-
 import javax.swing.BasicSwingTestCase;
 import javax.swing.JButton;
 import javax.swing.JComponent;
@@ -31,8 +30,9 @@
 import javax.swing.JPanel;
 
 public class AncestorEventTest extends BasicSwingTestCase {
-    protected static class TestAncestorListener extends EventsController
-            implements AncestorListener {
+    protected static class TestAncestorListener extends EventsController implements
+            AncestorListener {
+        private static final long serialVersionUID = 1L;
 
         public TestAncestorListener() {
             super(false);
@@ -45,24 +45,31 @@
         public void ancestorAdded(final AncestorEvent e) {
             addEvent(new Integer(getNumEvents()), e);
             if (isVerbose()) {
-                System.out.println(">>>>>>> added: owner=" + getName(e.getComponent()) + ", ancestor=" + getName(e.getAncestor()) + ", ancestorParent=" + getName(e.getAncestorParent()));
+                System.out.println(">>>>>>> added: owner=" + getName(e.getComponent())
+                        + ", ancestor=" + getName(e.getAncestor()) + ", ancestorParent="
+                        + getName(e.getAncestorParent()));
             }
         }
 
         public void ancestorMoved(final AncestorEvent e) {
             addEvent(new Integer(getNumEvents()), e);
             if (isVerbose()) {
-                System.out.println(">>>>>>> moved: owner=" + getName(e.getComponent()) + ", ancestor=" + getName(e.getAncestor()) + ", ancestorParent=" + getName(e.getAncestorParent()));
+                System.out.println(">>>>>>> moved: owner=" + getName(e.getComponent())
+                        + ", ancestor=" + getName(e.getAncestor()) + ", ancestorParent="
+                        + getName(e.getAncestorParent()));
             }
         }
 
         public void ancestorRemoved(final AncestorEvent e) {
             addEvent(new Integer(getNumEvents()), e);
             if (isVerbose()) {
-                System.out.println(">>>>>>> removed: owner=" + getName(e.getComponent()) + ", ancestor=" + getName(e.getAncestor()) + ", ancestorParent=" + getName(e.getAncestorParent()));
+                System.out.println(">>>>>>> removed: owner=" + getName(e.getComponent())
+                        + ", ancestor=" + getName(e.getAncestor()) + ", ancestorParent="
+                        + getName(e.getAncestorParent()));
             }
         }
 
+        @Override
         public void reset() {
             super.reset();
             if (isVerbose()) {
@@ -71,7 +78,7 @@
         }
 
         public AncestorEvent getEvent() {
-            return (AncestorEvent)getLastEvent();
+            return (AncestorEvent) getLastEvent();
         }
 
         public int getEventType() {
@@ -84,20 +91,24 @@
     }
 
     private JPanel ancestor;
+
     private JButton component;
+
     private TestAncestorListener listener;
+
     private JFrame frame;
 
+    @Override
     protected void setUp() throws Exception {
         ancestor = new JPanel();
         component = new JButton();
         ancestor.add(component);
         listener = new TestAncestorListener();
-
         component.addAncestorListener(listener);
         waitForIdle();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         listener.setVerbose(false);
         ancestor = null;
@@ -113,39 +124,32 @@
         int id = 123;
         JComponent source = new JPanel();
         AncestorEvent event = new AncestorEvent(source, id, null, null);
-
         assertEquals(id, event.getID());
         assertEquals(source, event.getSource());
     }
 
     public void testGetComponent() throws Exception {
         AncestorEvent event = new AncestorEvent(component, 0, null, null);
-
         assertEquals(component, event.getComponent());
     }
 
     public void testGetAncestor() throws Exception {
         AncestorEvent event = new AncestorEvent(component, 0, ancestor, null);
-
         assertEquals(ancestor, event.getAncestor());
     }
 
     public void testGetAncestorParent() throws Exception {
         AncestorEvent event = new AncestorEvent(component, 0, null, ancestor);
-
         assertEquals(ancestor, event.getAncestorParent());
     }
 
-
     public void testAncestorAddedEventWhenAncestorVisible() throws Exception {
         frame = createVisibleFrameWithAncestor();
         ancestor.setVisible(false);
         component.setVisible(true);
         waitForIdle();
         listener.reset();
-
         ancestor.setVisible(true);
-
         waitForIdle();
         assertTrue(listener.getNumEvents() >= 1);
         performChecksInQueue(ancestor, frame.getContentPane(), AncestorEvent.ANCESTOR_ADDED);
@@ -157,9 +161,7 @@
         component.setVisible(false);
         waitForIdle();
         listener.reset();
-
         component.setVisible(true);
-
         waitForIdle();
         assertTrue(listener.getNumEvents() >= 1);
         performChecksInQueue(component, ancestor, AncestorEvent.ANCESTOR_ADDED);
@@ -171,9 +173,7 @@
         component.setVisible(false);
         waitForIdle();
         listener.reset();
-
         ancestor.setVisible(true);
-
         waitForIdle();
         assertEquals(0, listener.getNumEvents());
     }
@@ -184,9 +184,7 @@
         component.setVisible(false);
         waitForIdle();
         listener.reset();
-
         component.setVisible(true);
-
         waitForIdle();
         assertEquals(0, listener.getNumEvents());
     }
@@ -196,7 +194,6 @@
         ancestor.remove(component);
         waitForIdle();
         listener.reset();
-
         ComponentListener compListener = addComponentListener(component);
         ancestor.add(component);
         waitForIdle();
@@ -210,7 +207,6 @@
     public void testAncestorAddedEventWhenAncestorAdded() throws Exception {
         frame = createVisibleFrameWithAncestor();
         waitForIdle();
-
         assertTrue(listener.getNumEvents() >= 3);
         performChecksInQueue(ancestor.getRootPane(), frame, AncestorEvent.ANCESTOR_MOVED);
         performChecksInQueue(component, ancestor, AncestorEvent.ANCESTOR_MOVED);
@@ -227,7 +223,6 @@
         ancestor.setVisible(false);
         waitForIdle();
         listener.reset();
-
         ComponentListener compListener = addComponentListener(component);
         ancestor.setBounds(20, 20, 20, 20);
         waitForIdle();
@@ -244,7 +239,6 @@
         component.setVisible(false);
         waitForIdle();
         listener.reset();
-
         ComponentListener compListener = addComponentListener(component);
         ancestor.setBounds(20, 20, 20, 20);
         waitForIdle();
@@ -260,7 +254,6 @@
         ancestor.setVisible(false);
         waitForIdle();
         listener.reset();
-
         ComponentListener compListener = addComponentListener(component);
         component.setBounds(20, 20, 20, 20);
         waitForIdle();
@@ -277,7 +270,6 @@
         component.setVisible(false);
         waitForIdle();
         listener.reset();
-
         ComponentListener compListener = addComponentListener(component);
         component.setBounds(20, 20, 20, 20);
         waitForIdle();
@@ -293,14 +285,12 @@
         ancestor.setBounds(10, 10, 10, 10);
         waitForIdle();
         listener.reset();
-
         ComponentListener compListener = addComponentListener(component);
         ancestor.setBounds(20, 20, 20, 20);
         waitForIdle();
         synchronized (compListener) {
             compListener.wait(1000);
         }
-
         assertTrue(listener.getNumEvents() >= 1);
         performChecksInQueue(ancestor, frame.getContentPane(), AncestorEvent.ANCESTOR_MOVED);
     }
@@ -308,16 +298,13 @@
     public void testAncestorMovedEventWhenComponentMoved() throws Exception {
         component.setSize(200, 200);
         waitForIdle();
-
         assertEquals(0, listener.getNumEvents());
-
         ComponentListener compListener = addComponentListener(component);
         component.setLocation(20, 20);
         waitForIdle();
         synchronized (compListener) {
             compListener.wait(1000);
         }
-
         assertEquals(1, listener.getNumEvents());
         performChecks(component, ancestor, AncestorEvent.ANCESTOR_MOVED);
     }
@@ -326,10 +313,8 @@
         frame = createVisibleFrameWithAncestor();
         waitForIdle();
         listener.reset();
-
         component.setVisible(false);
         waitForIdle();
-
         assertEquals(1, listener.getNumEvents());
         performChecks(component, ancestor, AncestorEvent.ANCESTOR_REMOVED);
     }
@@ -338,7 +323,6 @@
         frame = createVisibleFrameWithAncestor();
         waitForIdle();
         listener.reset();
-
         ancestor.remove(component);
         waitForIdle();
         assertEquals(1, listener.getNumEvents());
@@ -349,10 +333,8 @@
         frame = createVisibleFrameWithAncestor();
         waitForIdle();
         listener.reset();
-
         ancestor.setVisible(false);
         waitForIdle();
-
         assertTrue(listener.getNumEvents() >= 1);
         performChecksInQueue(ancestor, frame.getContentPane(), AncestorEvent.ANCESTOR_REMOVED);
     }
@@ -361,7 +343,6 @@
         frame = createVisibleFrameWithAncestor();
         waitForIdle();
         listener.reset();
-
         frame.getContentPane().remove(ancestor);
         waitForIdle();
         assertEquals(1, listener.getNumEvents());
@@ -375,24 +356,21 @@
         result.getContentPane().add(ancestor);
         result.setSize(200, 200);
         result.setVisible(true);
-
         return result;
     }
 
-    private void performChecks(final Component ancestor,
-                               final Component ancestorParent,
-                               final int eventType) {
+    private void performChecks(final Component ancestor, final Component ancestorParent,
+            final int eventType) {
         final AncestorEvent event = listener.getEvent();
         performChecks(event, ancestor, ancestorParent, eventType);
     }
 
-    private void performChecksInQueue(final Component ancestor,
-                               final Component ancestorParent,
-                               final int eventType) {
+    private void performChecksInQueue(final Component ancestor, final Component ancestorParent,
+            final int eventType) {
         AncestorEvent event = null;
         for (int i = 0; i < listener.getNumEvents(); i++) {
             final Integer key = new Integer(i);
-            AncestorEvent e = (AncestorEvent)listener.getEvent(key);
+            AncestorEvent e = (AncestorEvent) listener.getEvent(key);
             if (e != null && e.getID() == eventType && e.getAncestor() == ancestor) {
                 event = e;
                 break;
@@ -402,10 +380,8 @@
         performChecks(event, ancestor, ancestorParent, eventType);
     }
 
-    private void performChecks(final AncestorEvent event,
-                               final Component ancestor,
-                               final Component ancestorParent,
-                               final int eventType) {
+    private void performChecks(final AncestorEvent event, final Component ancestor,
+            final Component ancestorParent, final int eventType) {
         assertNotNull(event);
         assertEquals("source", component, event.getSource());
         assertEquals("component", component, event.getComponent());
@@ -422,9 +398,14 @@
                 }
             }
 
-            public void componentResized(final ComponentEvent e) {}
-            public void componentShown(final ComponentEvent e) {}
-            public void componentHidden(final ComponentEvent e) {}
+            public void componentResized(final ComponentEvent e) {
+            }
+
+            public void componentShown(final ComponentEvent e) {
+            }
+
+            public void componentHidden(final ComponentEvent e) {
+            }
         };
         c.addComponentListener(compListener);
         return compListener;

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/CaretEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/CaretEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/CaretEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/CaretEventTest.java Sun Nov 26 12:15:43 2006
@@ -26,28 +26,31 @@
 
 public class CaretEventTest extends TestCase {
     SimpleCaretEvent sce;
+
     Object obj;
 
     class SimpleCaretEvent extends CaretEvent {
+        private static final long serialVersionUID = 1L;
 
         public SimpleCaretEvent(final Object obj) {
             super(obj);
         }
 
-        public int getMark(){
+        @Override
+        public int getMark() {
             return 0;
         }
 
-        public int getDot(){
+        @Override
+        public int getDot() {
             return 0;
         }
-
     }
 
-
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         obj = new Object();
         sce = new SimpleCaretEvent(obj);
@@ -57,13 +60,13 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
 
     public void testCaretEvent() {
         assertNotNull(sce);
-        assertEquals(sce.getSource(),obj);
-    }
-
+        assertEquals(sce.getSource(), obj);
     }
+}

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ChangeEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ChangeEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ChangeEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ChangeEventTest.java Sun Nov 26 12:15:43 2006
@@ -29,17 +29,18 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         source = new Object();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         source = null;
     }
 
     public void testChangeEvent() throws Exception {
         ChangeEvent event = new ChangeEvent(source);
-
         assertEquals(source, event.getSource());
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/DocumentEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/DocumentEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/DocumentEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/DocumentEventTest.java Sun Nov 26 12:15:43 2006
@@ -27,7 +27,6 @@
         super(name);
     }
 
-
     public void testEventType() throws Exception {
         assertEquals("INSERT", DocumentEvent.EventType.INSERT.toString());
         assertEquals("REMOVE", DocumentEvent.EventType.REMOVE.toString());

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/EventListenerListTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/EventListenerListTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/EventListenerListTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/EventListenerListTest.java Sun Nov 26 12:15:43 2006
@@ -30,11 +30,9 @@
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.EventListener;
-
 import javax.swing.SwingTestCase;
 
 public class EventListenerListTest extends SwingTestCase {
-
     static class ConcreteListener implements EventListener {
         protected String name = null;
 
@@ -45,18 +43,18 @@
             this.name = name;
         }
 
+        @Override
         public String toString() {
             return name;
         }
 
-        public int findMe(final Object[] listenersArray, final Class myClass) {
+        public int findMe(final Object[] listenersArray, final Class<?> myClass) {
             int found = 0;
             for (int i = 0; i < listenersArray.length; i += 2) {
-                if (listenersArray[i] == myClass && listenersArray[i+1] == this) {
+                if (listenersArray[i] == myClass && listenersArray[i + 1] == this) {
                     found++;
                 }
             }
-
             return found;
         }
 
@@ -67,12 +65,12 @@
                     found++;
                 }
             }
-
             return found;
         }
     }
 
     static class ConcreteSerializableListener extends ConcreteListener implements Serializable {
+        private static final long serialVersionUID = 1L;
 
         public ConcreteSerializableListener() {
         }
@@ -87,11 +85,10 @@
         }
 
         private void readObject(final ObjectInputStream inStream) throws IOException,
-                                                                   ClassNotFoundException  {
+                ClassNotFoundException {
             inStream.defaultReadObject();
-            name = (String)inStream.readObject();
+            name = (String) inStream.readObject();
         }
-
     }
 
     protected EventListenerList list = null;
@@ -103,15 +100,16 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         list = new EventListenerList();
     }
 
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -120,37 +118,27 @@
         ConcreteListener listener1 = new ConcreteListener("1");
         ConcreteListener listener2 = new ConcreteListener("2");
         ConcreteListener listener3 = new ConcreteListener("3");
-
         list.add(ConcreteListener.class, listener1);
         list.add(ConcreteListener.class, listener2);
         list.add(ConcreteListener.class, listener3);
         assertTrue(list.getListenerCount() == 3);
-
         list.remove(ConcreteListener.class, listener2);
         assertTrue(list.getListenerCount() == 2);
-
         list.remove(ConcreteListener.class, listener1);
         assertTrue(list.getListenerCount() == 1);
-
         list.add(ConcreteListener.class, listener2);
         list.add(EventListener.class, listener1);
         list.add(EventListener.class, listener3);
         assertTrue(list.getListenerCount() == 4);
-
         list.remove(ConcreteListener.class, listener1);
         assertTrue(list.getListenerCount() == 4);
-
         list.remove(ConcreteListener.class, listener2);
         assertTrue(list.getListenerCount() == 3);
-
         list.remove(ConcreteListener.class, listener3);
         assertTrue(list.getListenerCount() == 2);
-
         list.remove(EventListener.class, listener3);
         assertTrue(list.getListenerCount() == 1);
-
         list.remove(EventListener.class, null);
-
         list.remove(EventListener.class, listener1);
         assertTrue(list.getListenerCount() == 0);
     }
@@ -160,33 +148,27 @@
         ConcreteListener listener2 = new ConcreteListener("2");
         ConcreteListener listener3 = new ConcreteListener("3");
         Object[] listenersList = null;
-
         list.add(ConcreteListener.class, listener1);
         assertTrue(list.getListenerCount() == 1);
         listenersList = list.getListenerList();
         assertTrue(listener1.findMe(listenersList, ConcreteListener.class) == 1);
-
         list.add(ConcreteListener.class, listener2);
         assertTrue(list.getListenerCount() == 2);
         listenersList = list.getListenerList();
         assertTrue(listener1.findMe(listenersList, ConcreteListener.class) == 1);
         assertTrue(listener2.findMe(listenersList, ConcreteListener.class) == 1);
-
         list.add(ConcreteListener.class, listener3);
         assertTrue(list.getListenerCount() == 3);
         listenersList = list.getListenerList();
         assertTrue(listener1.findMe(listenersList, ConcreteListener.class) == 1);
         assertTrue(listener2.findMe(listenersList, ConcreteListener.class) == 1);
         assertTrue(listener3.findMe(listenersList, ConcreteListener.class) == 1);
-
         list.add(ConcreteListener.class, listener1);
         assertTrue(list.getListenerCount() == 4);
         listenersList = list.getListenerList();
         assertTrue(listener1.findMe(listenersList, ConcreteListener.class) == 2);
         assertTrue(listener2.findMe(listenersList, ConcreteListener.class) == 1);
         assertTrue(listener3.findMe(listenersList, ConcreteListener.class) == 1);
-
-
         list.add(EventListener.class, listener1);
         list.add(EventListener.class, listener2);
         assertTrue(list.getListenerCount() == 6);
@@ -203,25 +185,20 @@
         ConcreteListener listener2 = new ConcreteListener("2");
         ConcreteListener listener3 = new ConcreteListener("3");
         EventListener[] listenersList = null;
-
         listenersList = list.getListeners(ConcreteListener.class);
         assertTrue(listener1.findMe(listenersList) == 0);
-
         list.add(ConcreteListener.class, listener1);
         listenersList = list.getListeners(ConcreteListener.class);
         assertTrue(listener1.findMe(listenersList) == 1);
-
         list.add(ConcreteListener.class, listener2);
         listenersList = list.getListeners(ConcreteListener.class);
         assertTrue(listener1.findMe(listenersList) == 1);
         assertTrue(listener2.findMe(listenersList) == 1);
-
         list.add(ConcreteListener.class, listener3);
         listenersList = list.getListeners(ConcreteListener.class);
         assertTrue(listener1.findMe(listenersList) == 1);
         assertTrue(listener2.findMe(listenersList) == 1);
         assertTrue(listener3.findMe(listenersList) == 1);
-
         list.add(ConcreteListener.class, listener3);
         list.add(EventListener.class, listener1);
         list.add(EventListener.class, listener2);
@@ -245,11 +222,9 @@
         ConcreteListener listener1 = new ConcreteListener("1");
         ConcreteListener listener2 = new ConcreteListener("2");
         ConcreteListener listener3 = new ConcreteListener("3");
-
         list.add(ConcreteListener.class, listener1);
         list.add(ConcreteListener.class, listener2);
         list.add(ConcreteListener.class, listener3);
-
         assertFalse(list.toString() == null && list.toString().equals(""));
     }
 
@@ -266,14 +241,11 @@
         ConcreteListener listener1 = new ConcreteListener("1");
         ConcreteListener listener2 = new ConcreteListener("2");
         ConcreteListener listener3 = new ConcreteListener("3");
-
         assertTrue(list.getListenerCount(ConcreteListener.class) == 0);
-
         list.add(ConcreteListener.class, listener1);
         list.add(ConcreteListener.class, listener2);
         list.add(ConcreteListener.class, listener3);
         assertTrue(list.getListenerCount(ConcreteListener.class) == 3);
-
         list.add(EventListener.class, listener1);
         list.add(EventListener.class, listener2);
         list.add(ConcreteListener.class, listener1);
@@ -288,23 +260,18 @@
         ConcreteListener listener1 = new ConcreteListener("1");
         ConcreteListener listener2 = new ConcreteListener("2");
         ConcreteListener listener3 = new ConcreteListener("3");
-
         assertTrue(list.getListenerCount() == 0);
-
         list.add(ConcreteListener.class, listener1);
         list.add(ConcreteListener.class, listener2);
         list.add(ConcreteListener.class, listener3);
         assertTrue(list.getListenerCount() == 3);
-
         list.add(ConcreteListener.class, listener1);
         assertTrue(list.getListenerCount() == 4);
-
         list.add(EventListener.class, listener1);
         list.add(EventListener.class, listener2);
         assertTrue(list.getListenerCount() == 6);
     }
 
-
     public void testWriteObject() throws IOException {
         ConcreteListener listener1 = new ConcreteSerializableListener("1");
         ConcreteSerializableListener listener2 = new ConcreteSerializableListener("2");
@@ -331,11 +298,11 @@
         so.flush();
         InputStream fi = new ByteArrayInputStream(fo.toByteArray());
         ObjectInputStream si = new ObjectInputStream(fi);
-        EventListenerList resurrectedList = (EventListenerList)si.readObject();
+        EventListenerList resurrectedList = (EventListenerList) si.readObject();
         assertTrue(resurrectedList.getListeners(ConcreteListener.class).length == 1);
-        assertTrue(((ConcreteListener)resurrectedList.getListeners(ConcreteListener.class)[0]).name.equals("1"));
+        assertTrue((resurrectedList.getListeners(ConcreteListener.class)[0]).name.equals("1"));
         assertTrue(resurrectedList.getListeners(EventListener.class).length == 1);
-        assertTrue(((ConcreteListener)resurrectedList.getListeners(EventListener.class)[0]).name.equals("2"));
+        assertTrue(((ConcreteListener) resurrectedList.getListeners(EventListener.class)[0]).name
+                .equals("2"));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/InternalFrameEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/InternalFrameEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/InternalFrameEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/InternalFrameEventTest.java Sun Nov 26 12:15:43 2006
@@ -18,7 +18,6 @@
  * @author Vadim L. Bogdanov
  * @version $Revision$
  */
-
 package javax.swing.event;
 
 import javax.swing.JInternalFrame;
@@ -38,44 +37,28 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         frame = new JInternalFrame();
     }
 
     /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-
-    /*
-     * Class under test for InternalFrameEvent(JInternalFrame, id)
-     */
-    public void testInternalFrameEvent() {
-        InternalFrameEvent event = new InternalFrameEvent(
-                frame, InternalFrameEvent.INTERNAL_FRAME_CLOSED);
-    }
-
-    /*
      * Class under test for JInternalFrame getInternalFrame()
      */
     public void testGetInternalFrame() {
-        InternalFrameEvent event = new InternalFrameEvent(
-                frame, InternalFrameEvent.INTERNAL_FRAME_CLOSED);
-
+        InternalFrameEvent event = new InternalFrameEvent(frame,
+                InternalFrameEvent.INTERNAL_FRAME_CLOSED);
         assertTrue("== frame", event.getInternalFrame() == frame);
-        assertTrue("== getSource()",
-                event.getInternalFrame() == event.getSource());
+        assertTrue("== getSource()", event.getInternalFrame() == event.getSource());
     }
 
     /*
      * Class under test for String paramString()
      */
     public void testParamString() {
-        InternalFrameEvent event = new InternalFrameEvent(
-                frame, InternalFrameEvent.INTERNAL_FRAME_ACTIVATED);
+        InternalFrameEvent event = new InternalFrameEvent(frame,
+                InternalFrameEvent.INTERNAL_FRAME_ACTIVATED);
         assertTrue("paramString() cannot return null", event.paramString() != null);
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListDataEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListDataEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListDataEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListDataEventTest.java Sun Nov 26 12:15:43 2006
@@ -29,6 +29,7 @@
         super(name);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
     }
@@ -36,25 +37,21 @@
     public void testListDataEvent() throws Exception {
         Object source = new Object();
         event = new ListDataEvent(source, ListDataEvent.CONTENTS_CHANGED, 0, 0);
-
         assertEquals(source, event.getSource());
     }
 
     public void testGetIndex0() throws Exception {
         event = new ListDataEvent(new Object(), ListDataEvent.CONTENTS_CHANGED, 10, 0);
-
         assertEquals(0, event.getIndex0());
     }
 
     public void testGetIndex1() throws Exception {
         event = new ListDataEvent(new Object(), ListDataEvent.CONTENTS_CHANGED, 10, 5);
-
         assertEquals(10, event.getIndex1());
     }
 
     public void testToString() throws Exception {
         event = new ListDataEvent(new Object(), ListDataEvent.INTERVAL_ADDED, 1, 2);
-
         assertTrue(event.toString().indexOf("ListDataEvent") > 0);
         assertTrue(event.toString().indexOf("type=" + ListDataEvent.INTERVAL_ADDED) > 0);
         assertTrue(event.toString().indexOf("index0=1") > 0);

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListSelectionEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListSelectionEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListSelectionEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/ListSelectionEventTest.java Sun Nov 26 12:15:43 2006
@@ -21,7 +21,6 @@
 package javax.swing.event;
 
 import javax.swing.SwingTestCase;
-import javax.swing.event.ListSelectionEvent;
 
 public class ListSelectionEventTest extends SwingTestCase {
     private ListSelectionEvent event;
@@ -30,6 +29,7 @@
         super(name);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
     }
@@ -37,7 +37,6 @@
     public void testListSelectionEvent() throws Exception {
         Object source = new Object();
         event = new ListSelectionEvent(source, 50, 10, false);
-
         assertEquals(source, event.getSource());
     }
 
@@ -54,7 +53,6 @@
     public void testGetValueIsAdjusting() throws Exception {
         event = new ListSelectionEvent(new Object(), 5, 10, false);
         assertFalse(event.getValueIsAdjusting());
-
         event = new ListSelectionEvent(new Object(), 5, 10, true);
         assertTrue(event.getValueIsAdjusting());
     }
@@ -63,6 +61,7 @@
         event = new ListSelectionEvent(new Object(), 5, 10, true);
         String stringRepresentation = event.toString();
         assertNotNull(stringRepresentation);
-        assertTrue(stringRepresentation.indexOf("firstIndex= 5 lastIndex= 10 isAdjusting= true") > 0);
+        assertTrue(stringRepresentation
+                .indexOf("firstIndex= 5 lastIndex= 10 isAdjusting= true") > 0);
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MenuKeyEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MenuKeyEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MenuKeyEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MenuKeyEventTest.java Sun Nov 26 12:15:43 2006
@@ -15,24 +15,22 @@
  *  limitations under the License.
  */
 /**
-* @author Alexander T. Simbirtsev
-* @version $Revision$
-*/
+ * @author Alexander T. Simbirtsev
+ * @version $Revision$
+ */
 package javax.swing.event;
 
 import javax.swing.JMenuItem;
 import javax.swing.MenuElement;
 import javax.swing.MenuSelectionManager;
-
 import junit.framework.TestCase;
 
 public class MenuKeyEventTest extends TestCase {
-
     protected MenuKeyEvent event;
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
-
         super.tearDown();
     }
 
@@ -41,7 +39,6 @@
      */
     public void testMenuKeyEvent() {
         // TODO implement
-
     }
 
     /*
@@ -49,9 +46,11 @@
      */
     public void testGetPath() {
         MenuElement[] path = new MenuElement[1];
-        event = new MenuKeyEvent(new JMenuItem(), 1, 2, 3, 4, 'a', path, new MenuSelectionManager());
+        event = new MenuKeyEvent(new JMenuItem(), 1, 2, 3, 4, 'a', path,
+                new MenuSelectionManager());
         assertSame(path, event.getPath());
-        event = new MenuKeyEvent(new JMenuItem(), 1, 2, 3, 4, 'a', null, new MenuSelectionManager());
+        event = new MenuKeyEvent(new JMenuItem(), 1, 2, 3, 4, 'a', null,
+                new MenuSelectionManager());
         assertSame(null, event.getPath());
     }
 
@@ -61,5 +60,4 @@
     public void testGetMenuSelectionManager() {
         // TODO implement
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MouseInputAdapterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MouseInputAdapterTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MouseInputAdapterTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/MouseInputAdapterTest.java Sun Nov 26 12:15:43 2006
@@ -22,10 +22,8 @@
 
 import java.awt.EventQueue;
 import java.awt.event.MouseEvent;
-
 import javax.swing.JComponent;
 import javax.swing.JPanel;
-
 import junit.framework.TestCase;
 
 public class MouseInputAdapterTest extends TestCase {
@@ -35,26 +33,28 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         adapter = new TestAdapter();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         adapter = null;
     }
 
-
     public void testMouseInputAdapter() throws Exception {
         JComponent component = new JPanel();
         component.addMouseListener(adapter);
-        component.dispatchEvent(new MouseEvent(component, MouseEvent.MOUSE_ENTERED, EventQueue.getMostRecentEventTime(), 0, 0, 0, 1, false));
+        component.dispatchEvent(new MouseEvent(component, MouseEvent.MOUSE_ENTERED, EventQueue
+                .getMostRecentEventTime(), 0, 0, 0, 1, false));
         assertTrue(adapter.isEventOccured());
     }
 
-
     private class TestAdapter extends MouseInputAdapter {
         private boolean eventOccured;
 
+        @Override
         public void mouseEntered(final MouseEvent e) {
             eventOccured = true;
         }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/PopupMenuEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/PopupMenuEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/PopupMenuEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/PopupMenuEventTest.java Sun Nov 26 12:15:43 2006
@@ -29,6 +29,7 @@
         super(name);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/SwingPropertyChangeSupportTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/SwingPropertyChangeSupportTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/SwingPropertyChangeSupportTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/SwingPropertyChangeSupportTest.java Sun Nov 26 12:15:43 2006
@@ -29,14 +29,14 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-
 import javax.swing.SwingTestCase;
 
 public class SwingPropertyChangeSupportTest extends SwingTestCase {
-
     public static class FindableListener {
         public String valueChangedKey = "";
+
         public Object valueChangedOld = null;
+
         public Object valueChangedNew = null;
 
         public void reset() {
@@ -52,21 +52,23 @@
                     found++;
                 }
             }
-
             return found;
         }
-
     }
 
-    public static class ConcreteVetoableChangeListener extends FindableListener implements VetoableChangeListener {
-        public void vetoableChange(final PropertyChangeEvent evt){
+    public static class ConcreteVetoableChangeListener extends FindableListener implements
+            VetoableChangeListener {
+        public void vetoableChange(final PropertyChangeEvent evt) {
             valueChangedKey = evt.getPropertyName();
             valueChangedOld = evt.getOldValue();
             valueChangedNew = evt.getNewValue();
         }
     };
 
-    public class ConcretePropertyChangeListener extends PropertyChangeController implements Serializable {
+    public class ConcretePropertyChangeListener extends PropertyChangeController implements
+            Serializable {
+        private static final long serialVersionUID = 1L;
+
         public ConcretePropertyChangeListener() {
             super();
         }
@@ -76,14 +78,12 @@
             for (int i = 0; i < listenersArray.length; i++) {
                 Object curListener = listenersArray[i];
                 if (curListener instanceof PropertyChangeListenerProxy) {
-                    PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy)curListener;
-                    if(proxy.getListener() == this &&
-                       proxy.getPropertyName().equals(property) ) {
+                    PropertyChangeListenerProxy proxy = (PropertyChangeListenerProxy) curListener;
+                    if (proxy.getListener() == this && proxy.getPropertyName().equals(property)) {
                         found++;
                     }
                 }
             }
-
             return found;
         }
 
@@ -92,12 +92,14 @@
         }
 
         private void readObject(final ObjectInputStream inStream) throws IOException,
-                                                                   ClassNotFoundException  {
+                ClassNotFoundException {
             inStream.defaultReadObject();
         }
     };
 
     public static class SerializableListener implements PropertyChangeListener, Serializable {
+        private static final long serialVersionUID = 1L;
+
         private String name;
 
         public SerializableListener() {
@@ -116,9 +118,9 @@
         }
 
         private void readObject(final ObjectInputStream inStream) throws IOException,
-                                                                   ClassNotFoundException  {
+                ClassNotFoundException {
             inStream.defaultReadObject();
-            name = (String)inStream.readObject();
+            name = (String) inStream.readObject();
         }
 
         public void propertyChange(PropertyChangeEvent e) {
@@ -126,11 +128,13 @@
     };
 
     protected Object panel;
+
     protected PropertyChangeSupport propertyChangeSupport;
 
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         panel = new SerializableListener("Panel");
@@ -140,6 +144,7 @@
     /*
      * @see TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         panel = null;
         propertyChangeSupport = null;
@@ -156,24 +161,20 @@
         propertyChangeSupport.addPropertyChangeListener("second", changeListener2);
         String oldValue = "old";
         String newValue = "new";
-
         propertyChangeSupport.firePropertyChange("first", oldValue, newValue);
         changeListener1.checkLastPropertyFired(panel, "first", oldValue, newValue);
         assertFalse(changeListener2.isChanged());
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.firePropertyChange("second", oldValue, newValue);
         assertFalse(changeListener1.isChanged());
         changeListener2.checkLastPropertyFired(panel, "second", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.addPropertyChangeListener("first", changeListener2);
         propertyChangeSupport.firePropertyChange("first", oldValue, newValue);
         changeListener1.checkLastPropertyFired(panel, "first", oldValue, newValue);
         changeListener2.checkLastPropertyFired(panel, "first", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.removePropertyChangeListener("first", changeListener2);
@@ -181,19 +182,16 @@
         propertyChangeSupport.firePropertyChange("first", oldValue, newValue);
         changeListener1.checkLastPropertyFired(panel, "first", oldValue, newValue);
         changeListener2.checkLastPropertyFired(panel, "first", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.firePropertyChange("second", oldValue, newValue);
         assertFalse(changeListener1.isChanged());
         changeListener2.checkLastPropertyFired(panel, "second", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.firePropertyChange("second", newValue, newValue);
         assertFalse(changeListener1.isChanged());
         assertFalse(changeListener2.isChanged());
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.firePropertyChange("second", null, null);
@@ -210,7 +208,6 @@
         ConcretePropertyChangeListener changeListener3 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener4 = new ConcretePropertyChangeListener();
         PropertyChangeListener[] propertyListeners = null;
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
         propertyChangeSupport.addPropertyChangeListener("first", changeListener1);
@@ -221,28 +218,23 @@
         propertyChangeSupport.addPropertyChangeListener(changeListener4);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 6);
-
         propertyChangeSupport.removePropertyChangeListener("third", changeListener3);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 6);
         assertTrue(changeListener3.findMe(propertyListeners) == 1);
-
         propertyChangeSupport.removePropertyChangeListener("first", changeListener2);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 5);
         assertTrue(changeListener2.findMyProxy(propertyListeners, "second") == 1);
         assertTrue(changeListener1.findMyProxy(propertyListeners, "first") == 2);
-
         propertyChangeSupport.removePropertyChangeListener(changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 5);
         assertTrue(changeListener1.findMyProxy(propertyListeners, "first") == 2);
-
         propertyChangeSupport.removePropertyChangeListener("first", changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 4);
         assertTrue(changeListener1.findMyProxy(propertyListeners, "first") == 1);
-
         propertyChangeSupport.removePropertyChangeListener("first", changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 3);
@@ -256,21 +248,17 @@
         ConcretePropertyChangeListener changeListener1 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener2 = new ConcretePropertyChangeListener();
         PropertyChangeListener[] propertyListeners = null;
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
-
         propertyChangeSupport.addPropertyChangeListener("first", changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 1);
         assertTrue(changeListener1.findMyProxy(propertyListeners, "first") == 1);
-
         propertyChangeSupport.addPropertyChangeListener("second", changeListener2);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 2);
         assertTrue(changeListener1.findMyProxy(propertyListeners, "first") == 1);
         assertTrue(changeListener2.findMyProxy(propertyListeners, "second") == 1);
-
         propertyChangeSupport.addPropertyChangeListener("third", changeListener2);
         propertyChangeSupport.addPropertyChangeListener(changeListener1);
         propertyChangeSupport.addPropertyChangeListener("first", changeListener1);
@@ -290,30 +278,25 @@
         ConcretePropertyChangeListener changeListener3 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener4 = new ConcretePropertyChangeListener();
         PropertyChangeListener[] propertyListeners = null;
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners("first");
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
-
         propertyChangeSupport.addPropertyChangeListener("first", changeListener1);
         propertyChangeSupport.addPropertyChangeListener("second", changeListener1);
         propertyChangeSupport.addPropertyChangeListener(changeListener2);
         propertyChangeSupport.addPropertyChangeListener(changeListener3);
         propertyChangeSupport.addPropertyChangeListener("second", changeListener4);
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners("first");
         assertTrue(propertyListeners != null && propertyListeners.length == 1);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
         assertTrue(changeListener2.findMe(propertyListeners) == 0);
         assertTrue(changeListener3.findMe(propertyListeners) == 0);
         assertTrue(changeListener4.findMe(propertyListeners) == 0);
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners("second");
         assertTrue(propertyListeners != null && propertyListeners.length == 2);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
         assertTrue(changeListener2.findMe(propertyListeners) == 0);
         assertTrue(changeListener3.findMe(propertyListeners) == 0);
         assertTrue(changeListener4.findMe(propertyListeners) == 1);
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners("null");
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
     }
@@ -324,37 +307,31 @@
     public void testHasListenersString() {
         ConcretePropertyChangeListener changeListener1 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener2 = new ConcretePropertyChangeListener();
-
         propertyChangeSupport.addPropertyChangeListener("first", changeListener1);
         assertTrue(propertyChangeSupport.hasListeners("first"));
         assertFalse(propertyChangeSupport.hasListeners("second"));
         assertFalse(propertyChangeSupport.hasListeners("third"));
         assertFalse(propertyChangeSupport.hasListeners("forth"));
-
         propertyChangeSupport.addPropertyChangeListener("second", changeListener2);
         assertTrue(propertyChangeSupport.hasListeners("first"));
         assertTrue(propertyChangeSupport.hasListeners("second"));
         assertFalse(propertyChangeSupport.hasListeners("third"));
         assertFalse(propertyChangeSupport.hasListeners("forth"));
-
         propertyChangeSupport.addPropertyChangeListener("third", changeListener1);
         assertTrue(propertyChangeSupport.hasListeners("first"));
         assertTrue(propertyChangeSupport.hasListeners("second"));
         assertTrue(propertyChangeSupport.hasListeners("third"));
         assertFalse(propertyChangeSupport.hasListeners("forth"));
-
         propertyChangeSupport.addPropertyChangeListener(changeListener2);
         assertTrue(propertyChangeSupport.hasListeners("first"));
         assertTrue(propertyChangeSupport.hasListeners("second"));
         assertTrue(propertyChangeSupport.hasListeners("third"));
         assertTrue(propertyChangeSupport.hasListeners("forth"));
-
         propertyChangeSupport.removePropertyChangeListener("first", changeListener1);
         assertTrue(propertyChangeSupport.hasListeners("first"));
         assertTrue(propertyChangeSupport.hasListeners("second"));
         assertTrue(propertyChangeSupport.hasListeners("third"));
         assertTrue(propertyChangeSupport.hasListeners("forth"));
-
         propertyChangeSupport.removePropertyChangeListener("first", changeListener2);
         assertTrue(propertyChangeSupport.hasListeners("first"));
         assertTrue(propertyChangeSupport.hasListeners("second"));
@@ -371,7 +348,6 @@
         ConcretePropertyChangeListener changeListener3 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener4 = new ConcretePropertyChangeListener();
         PropertyChangeListener[] propertyListeners = null;
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
         propertyChangeSupport.addPropertyChangeListener(changeListener1);
@@ -382,28 +358,23 @@
         propertyChangeSupport.addPropertyChangeListener(changeListener4);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 6);
-
         propertyChangeSupport.removePropertyChangeListener(changeListener3);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 5);
         assertTrue(changeListener1.findMe(propertyListeners) == 2);
         assertTrue(changeListener3.findMe(propertyListeners) == 0);
-
         propertyChangeSupport.removePropertyChangeListener(changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 4);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
-
         propertyChangeSupport.removePropertyChangeListener("first", changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 4);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
-
         propertyChangeSupport.removePropertyChangeListener(changeListener2);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 3);
         assertTrue(changeListener2.findMe(propertyListeners) == 0);
-
         propertyChangeSupport.removePropertyChangeListener(changeListener2);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 3);
@@ -419,28 +390,23 @@
         ConcretePropertyChangeListener changeListener3 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener4 = new ConcretePropertyChangeListener();
         PropertyChangeListener[] propertyListeners = null;
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
-
         propertyChangeSupport.addPropertyChangeListener(changeListener1);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 1);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
-
         propertyChangeSupport.addPropertyChangeListener(changeListener2);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 2);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
         assertTrue(changeListener2.findMe(propertyListeners) == 1);
-
         propertyChangeSupport.addPropertyChangeListener(changeListener3);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 3);
         assertTrue(changeListener1.findMe(propertyListeners) == 1);
         assertTrue(changeListener2.findMe(propertyListeners) == 1);
         assertTrue(changeListener3.findMe(propertyListeners) == 1);
-
         propertyChangeSupport.addPropertyChangeListener(changeListener1);
         propertyChangeSupport.addPropertyChangeListener(changeListener4);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
@@ -460,10 +426,8 @@
         ConcretePropertyChangeListener changeListener3 = new ConcretePropertyChangeListener();
         ConcretePropertyChangeListener changeListener4 = new ConcretePropertyChangeListener();
         PropertyChangeListener[] propertyListeners = null;
-
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
         assertTrue(propertyListeners != null && propertyListeners.length == 0);
-
         propertyChangeSupport.addPropertyChangeListener("first", changeListener1);
         propertyChangeSupport.addPropertyChangeListener("second", changeListener1);
         propertyChangeSupport.addPropertyChangeListener(changeListener2);
@@ -473,7 +437,6 @@
         assertTrue(changeListener2.findMe(propertyListeners) == 1);
         assertTrue(changeListener3.findMe(propertyListeners) == 0);
         assertTrue(changeListener4.findMe(propertyListeners) == 0);
-
         propertyChangeSupport.addPropertyChangeListener(changeListener3);
         propertyChangeSupport.addPropertyChangeListener("second", changeListener4);
         propertyListeners = propertyChangeSupport.getPropertyChangeListeners();
@@ -494,35 +457,35 @@
         propertyChangeSupport.addPropertyChangeListener("second", changeListener2);
         String oldValue = "old";
         String newValue = "new";
-
-        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "first", oldValue, newValue));
+        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "first",
+                oldValue, newValue));
         changeListener1.checkLastPropertyFired(panel, "first", oldValue, newValue);
         assertFalse(changeListener2.isChanged());
-
         changeListener1.reset();
         changeListener2.reset();
-        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "second", oldValue, newValue));
+        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "second",
+                oldValue, newValue));
         assertFalse(changeListener1.isChanged());
         changeListener2.checkLastPropertyFired(panel, "second", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.addPropertyChangeListener("first", changeListener2);
-        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "first", oldValue, newValue));
+        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "first",
+                oldValue, newValue));
         changeListener1.checkLastPropertyFired(panel, "first", oldValue, newValue);
         changeListener2.checkLastPropertyFired(panel, "first", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
         propertyChangeSupport.removePropertyChangeListener("first", changeListener2);
         propertyChangeSupport.addPropertyChangeListener(changeListener2);
-        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "first", oldValue, newValue));
+        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "first",
+                oldValue, newValue));
         changeListener1.checkLastPropertyFired(panel, "first", oldValue, newValue);
         changeListener2.checkLastPropertyFired(panel, "first", oldValue, newValue);
-
         changeListener1.reset();
         changeListener2.reset();
-        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "second", oldValue, newValue));
+        propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(panel, "second",
+                oldValue, newValue));
         assertFalse(changeListener1.isChanged());
         changeListener2.checkLastPropertyFired(panel, "second", oldValue, newValue);
     }
@@ -534,11 +497,12 @@
         PropertyChangeListener changeListener2 = new SerializableListener(name2);
         propertyChangeSupport.addPropertyChangeListener(name1, changeListener1);
         propertyChangeSupport.addPropertyChangeListener(name2, changeListener2);
-        PropertyChangeSupport resurrectedList = (PropertyChangeSupport)serializeObject(propertyChangeSupport);
+        PropertyChangeSupport resurrectedList = (PropertyChangeSupport) serializeObject(propertyChangeSupport);
         assertEquals(1, resurrectedList.getPropertyChangeListeners(name1).length);
-        assertEquals(name1, ((SerializableListener)resurrectedList.getPropertyChangeListeners(name1)[0]).name);
+        assertEquals(name1, ((SerializableListener) resurrectedList
+                .getPropertyChangeListeners(name1)[0]).name);
         assertEquals(1, resurrectedList.getPropertyChangeListeners(name2).length);
-        assertEquals(name2, ((SerializableListener)resurrectedList.getPropertyChangeListeners(name2)[0]).name);
+        assertEquals(name2, ((SerializableListener) resurrectedList
+                .getPropertyChangeListeners(name2)[0]).name);
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableColumnModelEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableColumnModelEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableColumnModelEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableColumnModelEventTest.java Sun Nov 26 12:15:43 2006
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Anton Avtamonov
  * @version $Revision$
@@ -31,10 +30,12 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         event = new TableColumnModelEvent(new DefaultTableColumnModel(), 5, 10);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
     }
@@ -43,7 +44,6 @@
         assertTrue(event.getSource() instanceof DefaultTableColumnModel);
         assertEquals(5, event.getFromIndex());
         assertEquals(10, event.getToIndex());
-
         event = new TableColumnModelEvent(new DefaultTableColumnModel(), 10, 5);
         assertEquals(10, event.getFromIndex());
         assertEquals(5, event.getToIndex());

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableModelEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableModelEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableModelEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TableModelEventTest.java Sun Nov 26 12:15:43 2006
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 /**
  * @author Anton Avtamonov
  * @version $Revision$
@@ -32,41 +31,37 @@
         super(name);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
     }
 
     public void testTableModelEvent() throws Exception {
         TableModel model = new DefaultTableModel();
-
         event = new TableModelEvent(model);
         assertEquals(model, event.getSource());
         assertEquals(0, event.getFirstRow());
         assertEquals(Integer.MAX_VALUE, event.getLastRow());
         assertEquals(TableModelEvent.ALL_COLUMNS, event.getColumn());
         assertEquals(TableModelEvent.UPDATE, event.getType());
-
         event = new TableModelEvent(model, 3);
         assertEquals(model, event.getSource());
         assertEquals(3, event.getFirstRow());
         assertEquals(3, event.getLastRow());
         assertEquals(TableModelEvent.ALL_COLUMNS, event.getColumn());
         assertEquals(TableModelEvent.UPDATE, event.getType());
-
         event = new TableModelEvent(model, 6, 2);
         assertEquals(model, event.getSource());
         assertEquals(6, event.getFirstRow());
         assertEquals(2, event.getLastRow());
         assertEquals(TableModelEvent.ALL_COLUMNS, event.getColumn());
         assertEquals(TableModelEvent.UPDATE, event.getType());
-
         event = new TableModelEvent(model, 6, 2, 5);
         assertEquals(model, event.getSource());
         assertEquals(6, event.getFirstRow());
         assertEquals(2, event.getLastRow());
         assertEquals(5, event.getColumn());
         assertEquals(TableModelEvent.UPDATE, event.getType());
-
         event = new TableModelEvent(model, 6, 2, 5, TableModelEvent.INSERT);
         assertEquals(model, event.getSource());
         assertEquals(6, event.getFirstRow());

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeExpansionEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeExpansionEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeExpansionEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeExpansionEventTest.java Sun Nov 26 12:15:43 2006
@@ -30,6 +30,7 @@
         super(name);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
     }
@@ -37,11 +38,9 @@
     public void testTreeExpansionEvent() throws Exception {
         Object source = new Object();
         TreePath path = new TreePath("path");
-
         event = new TreeExpansionEvent(source, path);
         assertSame(source, event.getSource());
         assertSame(path, event.getPath());
-
         event = new TreeExpansionEvent(source, null);
         assertNull(event.getPath());
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeModelEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeModelEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeModelEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeModelEventTest.java Sun Nov 26 12:15:43 2006
@@ -15,27 +15,26 @@
  *  limitations under the License.
  */
 /**
-* @author Alexander T. Simbirtsev
-* @version $Revision$
-*/
+ * @author Alexander T. Simbirtsev
+ * @version $Revision$
+ */
 package javax.swing.event;
 
 import java.util.Arrays;
-
 import javax.swing.SwingTestCase;
 import javax.swing.tree.TreePath;
 
 public class TreeModelEventTest extends SwingTestCase {
-
     protected TreeModelEvent event = null;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         event = null;
-
         super.tearDown();
     }
 
@@ -45,16 +44,14 @@
     public void testTreeModelEventObjectTreePathIntArrayObjectArray() {
         Object source = "111";
         TreePath path = new TreePath("222");
-        int[] indices = new int[] {1, 2};
-        Object[] children = new Object[] {"1", "2", "3"};
-
+        int[] indices = new int[] { 1, 2 };
+        Object[] children = new Object[] { "1", "2", "3" };
         event = new TreeModelEvent(source, path, indices, children);
         assertEquals(source, event.getSource());
         assertSame(path, event.path);
         assertSame(indices, event.childIndices);
         assertSame(children, event.children);
-
-        event = new TreeModelEvent(source, (TreePath)null, null, null);
+        event = new TreeModelEvent(source, (TreePath) null, null, null);
         assertEquals(source, event.getSource());
         assertNull(event.path);
         assertNull(event.childIndices);
@@ -66,10 +63,9 @@
      */
     public void testTreeModelEventObjectObjectArrayIntArrayObjectArray() {
         Object source = "111";
-        Object[] path = new Object[] {"11", "22", "33"};
-        int[] indices = new int[] {1, 2};
-        Object[] children = new Object[] {"1", "2", "3"};
-
+        Object[] path = new Object[] { "11", "22", "33" };
+        int[] indices = new int[] { 1, 2 };
+        Object[] children = new Object[] { "1", "2", "3" };
         event = new TreeModelEvent(source, path, indices, children);
         assertEquals(source, event.getSource());
         assertNotNull(event.path);
@@ -80,14 +76,12 @@
         assertEquals(children[0], event.getChildren()[0]);
         assertEquals(children[1], event.getChildren()[1]);
         assertEquals(children[2], event.getChildren()[2]);
-
         event = new TreeModelEvent(source, path, null, null);
         assertEquals(source, event.getSource());
         assertNotNull(event.path);
         assertNull(event.childIndices);
         assertNull(event.children);
-
-        event = new TreeModelEvent(source, (TreePath)null, null, null);
+        event = new TreeModelEvent(source, (TreePath) null, null, null);
         assertEquals(source, event.getSource());
         assertNull(event.path);
         assertNull(event.childIndices);
@@ -99,8 +93,7 @@
      */
     public void testTreeModelEventObjectObjectArray() {
         Object source = "111";
-        Object[] path = new Object[] {"11", "22", "33"};
-
+        Object[] path = new Object[] { "11", "22", "33" };
         event = new TreeModelEvent(source, path);
         assertEquals(source, event.getSource());
         assertNotNull(event.path);
@@ -115,15 +108,13 @@
     public void testTreeModelEventObjectTreePath() {
         Object source = "111";
         TreePath path = new TreePath("222");
-
         event = new TreeModelEvent(source, path);
         assertEquals(source, event.getSource());
         assertSame(path, event.path);
         assertNotNull(event.childIndices);
         assertEquals(0, event.childIndices.length);
         assertNull(event.children);
-
-        event = new TreeModelEvent(source, (TreePath)null);
+        event = new TreeModelEvent(source, (TreePath) null);
         assertEquals(source, event.getSource());
         assertNull(event.path);
         assertNotNull(event.childIndices);
@@ -137,14 +128,12 @@
     public void testGetChildIndices() {
         Object source = "111";
         TreePath path = new TreePath("222");
-        int[] indices1 = new int[] {1, 2};
-        int[] indices2 = new int[] {11, 22};
-        Object[] children = new Object[] {"1", "2", "3"};
-
+        int[] indices1 = new int[] { 1, 2 };
+        int[] indices2 = new int[] { 11, 22 };
+        Object[] children = new Object[] { "1", "2", "3" };
         event = new TreeModelEvent(source, path, indices1, children);
         assertNotSame(indices1, event.getChildIndices());
         assertTrue(Arrays.equals(indices1, event.getChildIndices()));
-
         event.childIndices = indices2;
         assertNotSame(indices2, event.getChildIndices());
         assertTrue(Arrays.equals(indices2, event.getChildIndices()));
@@ -156,14 +145,12 @@
     public void testGetChildren() {
         Object source = "111";
         TreePath path = new TreePath("222");
-        int[] indices = new int[] {1, 2};
-        Object[] children1 = new Object[] {"1", "2", "3"};
-        Object[] children2 = new Object[] {"11", "22", "33"};
-
+        int[] indices = new int[] { 1, 2 };
+        Object[] children1 = new Object[] { "1", "2", "3" };
+        Object[] children2 = new Object[] { "11", "22", "33" };
         event = new TreeModelEvent(source, path, indices, children1);
         assertNotSame(children1, event.getChildren());
         assertTrue(Arrays.equals(children1, event.getChildren()));
-
         event.children = children2;
         assertNotSame(children2, event.getChildren());
         assertTrue(Arrays.equals(children2, event.getChildren()));
@@ -174,24 +161,20 @@
      */
     public void testGetPath() {
         Object source = "111";
-        Object[] array1 = new Object[] {"1", "2", "3"};
-        Object[] array2 = new Object[] {"11", "22", "33"};
+        Object[] array1 = new Object[] { "1", "2", "3" };
+        Object[] array2 = new Object[] { "11", "22", "33" };
         TreePath path1 = new TreePath(array1);
         Object[] path2 = array2;
         TreePath path3 = new TreePath(array2);
-
         event = new TreeModelEvent(source, path1);
         assertNotSame(array1, event.getPath());
         assertTrue(Arrays.equals(array1, event.getPath()));
-
         event = new TreeModelEvent(source, path2);
         assertNotSame(array2, event.getPath());
         assertTrue(Arrays.equals(array2, event.getPath()));
-
         event.path = path3;
         assertNotSame(array2, event.getPath());
         assertTrue(Arrays.equals(array2, event.getPath()));
-
         event.path = null;
         assertNull(event.getPath());
     }
@@ -201,21 +184,17 @@
      */
     public void testGetTreePath() {
         Object source = "111";
-        Object[] array1 = new Object[] {"1", "2", "3"};
-        Object[] array2 = new Object[] {"11", "22", "33"};
+        Object[] array1 = new Object[] { "1", "2", "3" };
+        Object[] array2 = new Object[] { "11", "22", "33" };
         TreePath path1 = new TreePath(array1);
         Object[] path2 = array2;
         TreePath path3 = new TreePath(array2);
-
         event = new TreeModelEvent(source, path1);
         assertSame(path1, event.getTreePath());
-
         event = new TreeModelEvent(source, path2);
         assertTrue(Arrays.equals(array2, event.getTreePath().getPath()));
-
         event.path = path3;
         assertSame(path3, event.getTreePath());
-
         event.path = null;
         assertNull(event.getTreePath());
     }
@@ -226,10 +205,8 @@
     public void testToString() {
         Object source = "111";
         TreePath path = new TreePath("222");
-
         String str = new TreeModelEvent(source, path).toString();
         assertNotNull(str);
         assertFalse(str.equals(""));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeSelectionEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeSelectionEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeSelectionEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/TreeSelectionEventTest.java Sun Nov 26 12:15:43 2006
@@ -24,7 +24,6 @@
 import javax.swing.tree.TreePath;
 
 public class TreeSelectionEventTest extends SwingTestCase {
-
     protected TreeSelectionEvent event;
 
     /*
@@ -37,7 +36,6 @@
         Object source = new Object();
         boolean isNew = true;
         event = new TreeSelectionEvent(source, path, isNew, oldSelection, newSelection);
-
         assertEquals(source, event.getSource());
         assertEquals(path, event.getPath());
         assertEquals(isNew, event.areNew[0]);
@@ -49,13 +47,13 @@
      * Test method for 'javax.swing.event.TreeSelectionEvent.TreeSelectionEvent(Object, TreePath[], boolean[], TreePath, TreePath)'
      */
     public void testTreeSelectionEventObjectTreePathArrayBooleanArrayTreePathTreePath() {
-        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"), new TreePath("zxc")};
-        boolean[] areNew = new boolean[] {true, false, true};
+        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"),
+                new TreePath("zxc") };
+        boolean[] areNew = new boolean[] { true, false, true };
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = new Object();
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
-
         assertEquals(source, event.getSource());
         assertEquals(paths[0], event.getPaths()[0]);
         assertEquals(paths[1], event.getPaths()[1]);
@@ -71,14 +69,15 @@
      * Test method for 'javax.swing.event.TreeSelectionEvent.cloneWithSource(Object)'
      */
     public void testCloneWithSource() {
-        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"), new TreePath("zxc")};
-        boolean[] areNew = new boolean[] {true, false, true};
+        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"),
+                new TreePath("zxc") };
+        boolean[] areNew = new boolean[] { true, false, true };
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = "source";
         Object newSource = "newSource";
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
-        TreeSelectionEvent cloned = (TreeSelectionEvent)event.cloneWithSource(newSource);
+        TreeSelectionEvent cloned = (TreeSelectionEvent) event.cloneWithSource(newSource);
         assertEquals(newSource, cloned.getSource());
         assertEquals(paths[0], cloned.getPaths()[0]);
         assertEquals(paths[1], cloned.getPaths()[1]);
@@ -94,12 +93,12 @@
      * Test method for 'javax.swing.event.TreeSelectionEvent.getNewLeadSelectionPath()'
      */
     public void testGetNewLeadSelectionPath() {
-        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"), new TreePath("zxc")};
-        boolean[] areNew = new boolean[] {true, false, true};
+        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"),
+                new TreePath("zxc") };
+        boolean[] areNew = new boolean[] { true, false, true };
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = "source";
-
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertEquals(newSelection, event.getNewLeadSelectionPath());
     }
@@ -108,12 +107,12 @@
      * Test method for 'javax.swing.event.TreeSelectionEvent.getOldLeadSelectionPath()'
      */
     public void testGetOldLeadSelectionPath() {
-        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"), new TreePath("zxc")};
-        boolean[] areNew = new boolean[] {true, false, true};
+        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"),
+                new TreePath("zxc") };
+        boolean[] areNew = new boolean[] { true, false, true };
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = "source";
-
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertEquals(oldSelection, event.getOldLeadSelectionPath());
     }
@@ -122,19 +121,17 @@
      * Test method for 'javax.swing.event.TreeSelectionEvent.getPath()'
      */
     public void testGetPath() {
-        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"), new TreePath("zxc")};
-        boolean[] areNew = new boolean[] {true, false, true};
+        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"),
+                new TreePath("zxc") };
+        boolean[] areNew = new boolean[] { true, false, true };
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = new Object();
-
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertEquals(paths[0], event.getPath());
-
-        areNew = new boolean[] {false, false, true};
+        areNew = new boolean[] { false, false, true };
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertEquals(paths[0], event.getPath());
-
         event = new TreeSelectionEvent(source, paths[0], true, oldSelection, newSelection);
         assertEquals(paths[0], event.getPath());
     }
@@ -143,13 +140,13 @@
      * Test method for 'javax.swing.event.TreeSelectionEvent.getPaths()'
      */
     public void testGetPaths() {
-        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"), new TreePath("zxc")};
-        boolean[] areNew = new boolean[] {true, false, true};
+        TreePath[] paths = new TreePath[] { new TreePath("asd"), new TreePath("qwe"),
+                new TreePath("zxc") };
+        boolean[] areNew = new boolean[] { true, false, true };
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = new Object();
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
-
         assertNotSame(paths, event.getPaths());
         assertEquals(paths[0], event.getPaths()[0]);
         assertEquals(paths[1], event.getPaths()[1]);
@@ -163,31 +160,28 @@
         TreePath path1 = new TreePath("asd");
         TreePath path2 = new TreePath("dsa");
         TreePath path3 = new TreePath("qwe");
-        TreePath path4 = new TreePath("ewq");
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = new Object();
-
         event = new TreeSelectionEvent(source, path1, true, oldSelection, newSelection);
         assertTrue(event.isAddedPath(0));
-
         event = new TreeSelectionEvent(source, path1, false, oldSelection, newSelection);
         assertFalse(event.isAddedPath(0));
-
         event = new TreeSelectionEvent(source, path1, true, oldSelection, newSelection);
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 event.isAddedPath(1);
             }
         });
-
         TreePath[] paths = new TreePath[] { path1, path2, path3 };
-        boolean[] areNew = new boolean[] {true, false, true};
+        boolean[] areNew = new boolean[] { true, false, true };
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertTrue(event.isAddedPath(0));
         assertFalse(event.isAddedPath(1));
         assertTrue(event.isAddedPath(2));
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 event.isAddedPath(3);
             }
@@ -204,25 +198,19 @@
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = new Object();
-
         event = new TreeSelectionEvent(source, path1, true, oldSelection, newSelection);
         assertTrue(event.isAddedPath());
-
         event = new TreeSelectionEvent(source, path1, false, oldSelection, newSelection);
         assertFalse(event.isAddedPath());
-
         event = new TreeSelectionEvent(source, null, true, null, null);
         assertTrue(event.isAddedPath());
-
         event = new TreeSelectionEvent(source, null, false, null, null);
         assertFalse(event.isAddedPath());
-
         TreePath[] paths = new TreePath[] { path1, path2, path3 };
-        boolean[] areNew = new boolean[] {true, false, true};
+        boolean[] areNew = new boolean[] { true, false, true };
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertTrue(event.isAddedPath());
-
-        areNew = new boolean[] {false, false, true};
+        areNew = new boolean[] { false, false, true };
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertFalse(event.isAddedPath());
     }
@@ -238,33 +226,29 @@
         TreePath oldSelection = new TreePath("old");
         TreePath newSelection = new TreePath("new");
         Object source = new Object();
-
         event = new TreeSelectionEvent(source, path1, true, oldSelection, newSelection);
         assertTrue(event.isAddedPath(path1));
-
         event = new TreeSelectionEvent(source, path1, false, oldSelection, newSelection);
         assertFalse(event.isAddedPath(path1));
-
         event = new TreeSelectionEvent(source, path1, true, oldSelection, newSelection);
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 event.isAddedPath(path2);
             }
         });
-
         TreePath[] paths = new TreePath[] { path1, path2, path3 };
-        boolean[] areNew = new boolean[] {true, false, true};
+        boolean[] areNew = new boolean[] { true, false, true };
         event = new TreeSelectionEvent(source, paths, areNew, oldSelection, newSelection);
         assertTrue(event.isAddedPath(path1));
         assertFalse(event.isAddedPath(path2));
         assertTrue(event.isAddedPath(path3));
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 event.isAddedPath(path4);
             }
         });
-
         event = new TreeSelectionEvent(source, null, null, oldSelection, newSelection);
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/UndoableEditEventTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/UndoableEditEventTest.java?view=diff&rev=479418&r1=479417&r2=479418
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/UndoableEditEventTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/event/UndoableEditEventTest.java Sun Nov 26 12:15:43 2006
@@ -23,22 +23,24 @@
 import javax.swing.JTextField;
 import javax.swing.undo.AbstractUndoableEdit;
 import javax.swing.undo.UndoableEdit;
-
 import junit.framework.TestCase;
 
 public class UndoableEditEventTest extends TestCase {
     private TestUndoableEditListener listener;
+
     private Object source;
 
     public UndoableEditEventTest(final String name) {
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         listener = new TestUndoableEditListener();
         source = new Object();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         listener = null;
         source = null;
@@ -46,20 +48,18 @@
 
     public void testUndoableEditEvent() throws Exception {
         UndoableEditEvent event = new UndoableEditEvent(source, null);
-
         assertEquals(source, event.getSource());
     }
 
     public void testGetEdit() throws Exception {
         UndoableEdit edit = new AbstractUndoableEdit();
         UndoableEditEvent event = new UndoableEditEvent(source, edit);
-
         assertEquals(edit, event.getEdit());
     }
 
     public void testEventProperlyInitialized() throws Exception {
-        UndoableEditEvent event = new UndoableEditEvent(new Object(), new AbstractUndoableEdit());
-
+        UndoableEditEvent event = new UndoableEditEvent(new Object(),
+                new AbstractUndoableEdit());
         assertNotNull(event.getSource());
         assertNotNull(event.getEdit());
     }
@@ -67,15 +67,11 @@
     public void testEventOccured() throws Exception {
         JTextField field = new JTextField();
         field.getDocument().addUndoableEditListener(listener);
-
         field.setText("new text");
-
         assertNotNull(listener.getEvent());
         assertNotNull(listener.getEvent().getSource());
         assertNotNull(listener.getEvent().getEdit());
     }
-
-
 
     private class TestUndoableEditListener implements UndoableEditListener {
         private UndoableEditEvent event;



Mime
View raw message