harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r479240 [3/28] - /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/
Date Sun, 26 Nov 2006 00:04:16 GMT
Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractButton_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractButton_MultithreadedTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractButton_MultithreadedTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractButton_MultithreadedTest.java Sat Nov 25 16:04:10 2006
@@ -24,13 +24,10 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.image.BufferedImage;
-
 import javax.swing.Timer_MultithreadedTest.ConcreteActionListener;
-
 import junit.framework.TestCase;
 
 public class AbstractButton_MultithreadedTest extends TestCase {
-
     protected AbstractButton button = null;
 
     public AbstractButton_MultithreadedTest(final String str) {
@@ -40,21 +37,25 @@
     /*
      * @see JComponentTest#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         button = new JButton();
     }
 
     /*
      * @see JComponentTest#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
 
     class MyAction extends AbstractAction {
+        private static final long serialVersionUID = 1L;
+
         public Object performed = null;
+
         public int eventsCounter = 0;
 
         public MyAction(final String text, final Icon icon) {
@@ -116,5 +117,4 @@
         assertTrue("action performed", listener.performed != null);
         assertTrue("action performed", action.performed != null);
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractListModelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractListModelTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractListModelTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractListModelTest.java Sat Nov 25 16:04:10 2006
@@ -21,7 +21,6 @@
 package javax.swing;
 
 import java.awt.event.KeyListener;
-
 import javax.swing.event.ListDataEvent;
 import javax.swing.event.ListDataListener;
 
@@ -32,8 +31,11 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         model = new AbstractListModel() {
+            private static final long serialVersionUID = 1L;
+
             public Object getElementAt(final int index) {
                 return null;
             }
@@ -44,25 +46,22 @@
         };
     }
 
+    @Override
     protected void tearDown() throws Exception {
         model = null;
     }
 
     public void testAddRemoveGetDataListener() throws Exception {
         assertEquals(0, model.getListDataListeners().length);
-
         TestListener l1 = new TestListener();
         TestListener l2 = new TestListener();
         TestListener l3 = new TestListener();
-
         model.addListDataListener(l1);
         model.addListDataListener(l3);
         model.addListDataListener(l2);
         assertEquals(3, model.getListDataListeners().length);
-
         model.removeListDataListener(l2);
         assertEquals(2, model.getListDataListeners().length);
-
         model.removeListDataListener(new TestListener());
         assertEquals(2, model.getListDataListeners().length);
     }
@@ -70,7 +69,6 @@
     public void testGetListeners() throws Exception {
         assertEquals(0, model.getListeners(ListDataListener.class).length);
         assertEquals(0, model.getListeners(KeyListener.class).length);
-
         model.addListDataListener(new TestListener());
         assertEquals(1, model.getListeners(ListDataListener.class).length);
         assertEquals(0, model.getListeners(KeyListener.class).length);
@@ -79,14 +77,11 @@
     public void testFireContentChanged() throws Exception {
         TestListener l1 = new TestListener();
         TestListener l2 = new TestListener();
-
         model.addListDataListener(l1);
         model.addListDataListener(l2);
-
         model.fireContentsChanged(new Object(), 0, 2);
         checkListDataEvent(l1.getEvent(), ListDataEvent.CONTENTS_CHANGED, 0, 2);
         assertEquals(ListDataEvent.CONTENTS_CHANGED, l1.getType());
-
         checkListDataEvent(l2.getEvent(), ListDataEvent.CONTENTS_CHANGED, 0, 2);
         assertEquals(ListDataEvent.CONTENTS_CHANGED, l2.getType());
     }
@@ -94,17 +89,13 @@
     public void testFireIntervalAdded() throws Exception {
         TestListener l1 = new TestListener();
         TestListener l2 = new TestListener();
-
         model.addListDataListener(l1);
         model.addListDataListener(l2);
-
         model.fireIntervalAdded(new Object(), 5, 2);
         checkListDataEvent(l1.getEvent(), ListDataEvent.INTERVAL_ADDED, 2, 5);
         assertEquals(ListDataEvent.INTERVAL_ADDED, l1.getType());
-
         checkListDataEvent(l2.getEvent(), ListDataEvent.INTERVAL_ADDED, 2, 5);
         assertEquals(ListDataEvent.INTERVAL_ADDED, l2.getType());
-
         model.fireIntervalAdded(new Object(), 2, 5);
         checkListDataEvent(l1.getEvent(), ListDataEvent.INTERVAL_ADDED, 2, 5);
     }
@@ -112,29 +103,26 @@
     public void testFireIntervalRemoved() throws Exception {
         TestListener l1 = new TestListener();
         TestListener l2 = new TestListener();
-
         model.addListDataListener(l1);
         model.addListDataListener(l2);
-
         model.fireIntervalRemoved(new Object(), 1, 4);
         checkListDataEvent(l1.getEvent(), ListDataEvent.INTERVAL_REMOVED, 1, 4);
         assertEquals(ListDataEvent.INTERVAL_REMOVED, l1.getType());
-
         checkListDataEvent(l2.getEvent(), ListDataEvent.INTERVAL_REMOVED, 1, 4);
         assertEquals(ListDataEvent.INTERVAL_REMOVED, l2.getType());
     }
 
-
-    private void checkListDataEvent(final ListDataEvent event, final int expectedType, final int expectedIndex0, final int expectedIndex1) {
+    private void checkListDataEvent(final ListDataEvent event, final int expectedType,
+            final int expectedIndex0, final int expectedIndex1) {
         assertNotNull(event);
         assertEquals(expectedType, event.getType());
         assertEquals(expectedIndex0, event.getIndex0());
         assertEquals(expectedIndex1, event.getIndex1());
     }
 
-
     private class TestListener implements ListDataListener {
         private ListDataEvent event;
+
         private int eventType = -1;
 
         public void contentsChanged(final ListDataEvent e) {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractSpinnerModelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractSpinnerModelTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractSpinnerModelTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AbstractSpinnerModelTest.java Sat Nov 25 16:04:10 2006
@@ -18,31 +18,34 @@
  * @author Dennis Ushakov
  * @version $Revision$
  */
-
 package javax.swing;
 
 import java.util.Arrays;
 import java.util.EventListener;
 
 public class AbstractSpinnerModelTest extends BasicSwingTestCase {
-
     private AbstractSpinnerModel model;
+
     private ChangeController chl;
 
-    private static class TestListener implements EventListener {};
+    private static class TestListener implements EventListener {
+    };
 
+    @Override
     public void setUp() {
         model = new AbstractSpinnerModel() {
-
             public Object getNextValue() {
                 return null;
             }
+
             public Object getPreviousValue() {
                 return null;
             }
+
             public Object getValue() {
                 return "test";
             }
+
             public void setValue(Object value) {
                 fireStateChanged();
             }
@@ -50,6 +53,7 @@
         chl = new ChangeController();
     }
 
+    @Override
     public void tearDown() {
         model = null;
         chl = null;
@@ -58,7 +62,6 @@
     public void testAddRemoveChangeListener() {
         model.addChangeListener(chl);
         assertEquals(1, model.listenerList.getListenerCount());
-
         model.removeChangeListener(chl);
         assertEquals(0, model.listenerList.getListenerCount());
     }
@@ -80,4 +83,3 @@
         assertTrue(Arrays.asList(model.getListeners(TestListener.class)).contains(testListener));
     }
 }
-

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJButtonTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJButtonTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJButtonTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJButtonTest.java Sat Nov 25 16:04:10 2006
@@ -24,28 +24,26 @@
 
 import java.awt.Point;
 import java.awt.image.BufferedImage;
-
 import javax.accessibility.AccessibleRelationSet;
 import javax.accessibility.AccessibleState;
 import javax.accessibility.AccessibleText;
 
 public class AccessibleJButtonTest extends BasicSwingTestCase {
+    protected AbstractButton button;
 
-    protected AbstractButton button = null;
-
-    JButton.AccessibleJButton aContext = null;
+    private JButton.AccessibleJButton aContext;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         button = new JButton();
-        aContext = (JButton.AccessibleJButton)button.getAccessibleContext();
+        aContext = (JButton.AccessibleJButton) button.getAccessibleContext();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         button = null;
         aContext = null;
-
         super.tearDown();
     }
 
@@ -81,65 +79,62 @@
         ImageIcon icon1 = new ImageIcon(new BufferedImage(10, 10, BufferedImage.TYPE_BYTE_GRAY));
         ImageIcon icon2 = new ImageIcon(new BufferedImage(10, 10, BufferedImage.TYPE_BYTE_GRAY));
         assertNull("AccessibleIcon", aContext.getAccessibleIcon());
-
         button.setIcon(icon1);
         assertEquals("number of AccessibleIcons", 1, aContext.getAccessibleIcon().length);
-        assertEquals("AccessibleIcon", icon1.getAccessibleContext(), aContext.getAccessibleIcon()[0]);
-
+        assertEquals("AccessibleIcon", icon1.getAccessibleContext(), aContext
+                .getAccessibleIcon()[0]);
         button.setDisabledIcon(icon2);
         assertEquals("number of AccessibleIcons", 1, aContext.getAccessibleIcon().length);
-        assertEquals("AccessibleIcon", icon1.getAccessibleContext(), aContext.getAccessibleIcon()[0]);
+        assertEquals("AccessibleIcon", icon1.getAccessibleContext(), aContext
+                .getAccessibleIcon()[0]);
     }
 
     public void testGetAccessibleStateSet() {
         assertNotNull("AccessibleStateSet is not null", aContext.getAccessibleStateSet());
-        assertTrue("AccessibleStateSet contains ENABLED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertTrue("AccessibleStateSet contains FOCUSABLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertTrue("AccessibleStateSet contains VISIBLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertTrue("AccessibleStateSet contains OPAQUE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
-
+        assertTrue("AccessibleStateSet contains ENABLED", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.ENABLED));
+        assertTrue("AccessibleStateSet contains FOCUSABLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.FOCUSABLE));
+        assertTrue("AccessibleStateSet contains VISIBLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.VISIBLE));
+        assertTrue("AccessibleStateSet contains OPAQUE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.OPAQUE));
         button.setSelected(true);
         assertNotNull("AccessibleStateSet is not null", aContext.getAccessibleStateSet());
-        assertTrue("AccessibleStateSet contains ENABLED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertTrue("AccessibleStateSet contains FOCUSABLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertTrue("AccessibleStateSet contains VISIBLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertTrue("AccessibleStateSet contains OPAQUE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
-        assertTrue("AccessibleStateSet contains CHECKED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.CHECKED));
-
+        assertTrue("AccessibleStateSet contains ENABLED", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.ENABLED));
+        assertTrue("AccessibleStateSet contains FOCUSABLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.FOCUSABLE));
+        assertTrue("AccessibleStateSet contains VISIBLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.VISIBLE));
+        assertTrue("AccessibleStateSet contains OPAQUE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.OPAQUE));
+        assertTrue("AccessibleStateSet contains CHECKED", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.CHECKED));
         button.setEnabled(false);
         assertNotNull("AccessibleStateSet is not null", aContext.getAccessibleStateSet());
-        assertFalse("AccessibleStateSet doesn't contain ENABLED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertTrue("AccessibleStateSet contains FOCUSABLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertTrue("AccessibleStateSet contains VISIBLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertTrue("AccessibleStateSet contains OPAQUE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
-        assertTrue("AccessibleStateSet contains CHECKED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.CHECKED));
-
+        assertFalse("AccessibleStateSet doesn't contain ENABLED", aContext
+                .getAccessibleStateSet().contains(AccessibleState.ENABLED));
+        assertTrue("AccessibleStateSet contains FOCUSABLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.FOCUSABLE));
+        assertTrue("AccessibleStateSet contains VISIBLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.VISIBLE));
+        assertTrue("AccessibleStateSet contains OPAQUE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.OPAQUE));
+        assertTrue("AccessibleStateSet contains CHECKED", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.CHECKED));
         button.setVisible(false);
         assertNotNull("AccessibleStateSet is not null", aContext.getAccessibleStateSet());
-        assertFalse("AccessibleStateSet doesn't contain ENABLED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertTrue("AccessibleStateSet contains FOCUSABLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertFalse("AccessibleStateSet doesn't contain VISIBLE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertTrue("AccessibleStateSet contains OPAQUE",
-                aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
-        assertTrue("AccessibleStateSet contains CHECKED",
-                aContext.getAccessibleStateSet().contains(AccessibleState.CHECKED));
+        assertFalse("AccessibleStateSet doesn't contain ENABLED", aContext
+                .getAccessibleStateSet().contains(AccessibleState.ENABLED));
+        assertTrue("AccessibleStateSet contains FOCUSABLE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.FOCUSABLE));
+        assertFalse("AccessibleStateSet doesn't contain VISIBLE", aContext
+                .getAccessibleStateSet().contains(AccessibleState.VISIBLE));
+        assertTrue("AccessibleStateSet contains OPAQUE", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.OPAQUE));
+        assertTrue("AccessibleStateSet contains CHECKED", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.CHECKED));
     }
 
     public void testDoAccessibleAction() {
@@ -166,23 +161,28 @@
     }
 
     public void testGetAccessibleActionDescription() {
-        assertEquals("AccessibleActionDescription", "click", aContext.getAccessibleActionDescription(0));
+        assertEquals("AccessibleActionDescription", "click", aContext
+                .getAccessibleActionDescription(0));
         assertNull("AccessibleActionDescription", aContext.getAccessibleActionDescription(1));
     }
 
     public void testGetCurrentAccessibleValue() {
         button.setSelected(false);
-        assertEquals("CurrentAccessibleValue", new Integer(0), aContext.getCurrentAccessibleValue());
+        assertEquals("CurrentAccessibleValue", new Integer(0), aContext
+                .getCurrentAccessibleValue());
         button.setSelected(true);
-        assertEquals("CurrentAccessibleValue", new Integer(1), aContext.getCurrentAccessibleValue());
+        assertEquals("CurrentAccessibleValue", new Integer(1), aContext
+                .getCurrentAccessibleValue());
     }
 
     public void testGetMaximumAccessibleValue() {
-        assertEquals("MaximumAccessibleValue", new Integer(1), aContext.getMaximumAccessibleValue());
+        assertEquals("MaximumAccessibleValue", new Integer(1), aContext
+                .getMaximumAccessibleValue());
     }
 
     public void testGetMinimumAccessibleValue() {
-        assertEquals("MinimumAccessibleValue", new Integer(0), aContext.getMinimumAccessibleValue());
+        assertEquals("MinimumAccessibleValue", new Integer(0), aContext
+                .getMinimumAccessibleValue());
     }
 
     /**
@@ -194,23 +194,24 @@
     public void testSetCurrentAccessibleValue() {
         PropertyChangeController listener = new PropertyChangeController();
         aContext.addPropertyChangeListener(listener);
-
         assertTrue("returned value", aContext.setCurrentAccessibleValue(new Integer(100)));
-        assertEquals("CurrentAccessibleValue", new Integer(1), aContext.getCurrentAccessibleValue());
+        assertEquals("CurrentAccessibleValue", new Integer(1), aContext
+                .getCurrentAccessibleValue());
         assertTrue("button selected state", button.isSelected());
-
-        listener.checkPropertyFired(aContext, "AccessibleState", null, AccessibleState.SELECTED);
-        listener.checkPropertyFired(aContext, "AccessibleValue", new Integer(0), new Integer(1));
+        listener
+                .checkPropertyFired(aContext, "AccessibleState", null, AccessibleState.SELECTED);
+        listener
+                .checkPropertyFired(aContext, "AccessibleValue", new Integer(0), new Integer(1));
         listener.reset();
-
         assertTrue("returned value", aContext.setCurrentAccessibleValue(new Integer(0)));
-        assertEquals("CurrentAccessibleValue", new Integer(0), aContext.getCurrentAccessibleValue());
+        assertEquals("CurrentAccessibleValue", new Integer(0), aContext
+                .getCurrentAccessibleValue());
         assertFalse("button selected state", button.isSelected());
-
-        listener.checkPropertyFired(aContext, "AccessibleState", AccessibleState.SELECTED, null);
-        listener.checkPropertyFired(aContext, "AccessibleValue", new Integer(1), new Integer(0));
+        listener
+                .checkPropertyFired(aContext, "AccessibleState", AccessibleState.SELECTED, null);
+        listener
+                .checkPropertyFired(aContext, "AccessibleValue", new Integer(1), new Integer(0));
         listener.reset();
-
         assertTrue("returned value", aContext.setCurrentAccessibleValue(new Integer(0)));
         assertFalse("no event's fired ", listener.isChanged());
     }
@@ -292,5 +293,4 @@
         button.setText("text");
         assertNull("CharacterAttribute", aContext.getCharacterAttribute(1));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponentTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponentTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponentTest.java Sat Nov 25 16:04:10 2006
@@ -24,7 +24,6 @@
 
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
-
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleRole;
 import javax.swing.border.Border;
@@ -33,36 +32,43 @@
 import javax.swing.border.TitledBorder;
 
 public class AccessibleJComponentTest extends SwingTestCase {
-
     protected class ConcreteFocusListener implements FocusListener {
         public boolean state = false;
+
         public void focusGained(final FocusEvent arg0) {
             state = true;
         }
+
         public void focusLost(final FocusEvent arg0) {
             state = true;
         }
     };
 
     protected JComponent panel;
+
     protected JComponent.AccessibleJComponent aContext;
 
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         panel = new JComponent() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public AccessibleContext getAccessibleContext() {
-                return new AccessibleJComponent() {};
+                return new AccessibleJComponent() {
+                    private static final long serialVersionUID = 1L;
+                };
             }
         };
-        aContext = (JComponent.AccessibleJComponent)panel.getAccessibleContext();
+        aContext = (JComponent.AccessibleJComponent) panel.getAccessibleContext();
     }
 
     public void testGetAccessibleChildrenCount() {
         assertEquals(aContext.getAccessibleChildrenCount(), 0);
-
         panel.add(new JPanel());
         panel.add(new JPanel());
         panel.add(new JPanel());
@@ -87,9 +93,7 @@
         JPanel panel1 = new JPanel();
         JPanel panel2 = new JPanel();
         JPanel panel3 = new JPanel();
-
         assertNull(aContext.getAccessibleChild(0));
-
         panel.add(panel1);
         panel.add(panel2);
         panel.add(panel3);
@@ -101,9 +105,8 @@
     public void testGetToolTipText() {
         panel.setToolTipText("text");
         assertNull(aContext.getToolTipText());
-
         panel = new JButton();
-        aContext = (JComponent.AccessibleJComponent)panel.getAccessibleContext();
+        aContext = (JComponent.AccessibleJComponent) panel.getAccessibleContext();
         String text = "text";
         panel.setToolTipText(text);
         assertTrue(aContext.getToolTipText().equals(text));
@@ -114,8 +117,7 @@
         String title2 = "title2";
         assertNull(aContext.getTitledBorderText());
         panel.setBorder(new TitledBorder(title1));
-        assertEquals(aContext.getTitledBorderText(),title1);
-
+        assertEquals(aContext.getTitledBorderText(), title1);
         panel.setBorder(new CompoundBorder(new TitledBorder(title1), new TitledBorder(title2)));
         assertNull(aContext.getTitledBorderText());
     }
@@ -126,47 +128,42 @@
         String title3 = "title3";
         String title4 = "title3";
         Border border = null;
-
         assertNull(aContext.getBorderTitle(border));
-
         border = new TitledBorder(title1);
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title1);
-
         border = new CompoundBorder(new TitledBorder(title1), new EmptyBorder(1, 1, 1, 1));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title1);
-
         border = new CompoundBorder(new EmptyBorder(1, 1, 1, 1), new TitledBorder(title2));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title2);
-
         border = new CompoundBorder(new TitledBorder(title1), new TitledBorder(title2));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title2);
-
-        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1), new TitledBorder(title2)),
-                                    new CompoundBorder(new TitledBorder(title3), new TitledBorder(title4)));
+        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1),
+                new TitledBorder(title2)), new CompoundBorder(new TitledBorder(title3),
+                new TitledBorder(title4)));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title4);
-
-        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1), new TitledBorder(title2)),
-                                    new CompoundBorder(new TitledBorder(title3), new EmptyBorder(1, 1, 1, 1)));
+        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1),
+                new TitledBorder(title2)), new CompoundBorder(new TitledBorder(title3),
+                new EmptyBorder(1, 1, 1, 1)));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title3);
-
-        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1), new TitledBorder(title2)),
-                                    new CompoundBorder(new EmptyBorder(1, 1, 1, 1), new EmptyBorder(1, 1, 1, 1)));
+        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1),
+                new TitledBorder(title2)), new CompoundBorder(new EmptyBorder(1, 1, 1, 1),
+                new EmptyBorder(1, 1, 1, 1)));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title2);
-
-        border = new CompoundBorder(new CompoundBorder(new EmptyBorder(1, 1, 1, 1), new TitledBorder(title2)),
-                new CompoundBorder(new EmptyBorder(1, 1, 1, 1), new EmptyBorder(1, 1, 1, 1)));
+        border = new CompoundBorder(new CompoundBorder(new EmptyBorder(1, 1, 1, 1),
+                new TitledBorder(title2)), new CompoundBorder(new EmptyBorder(1, 1, 1, 1),
+                new EmptyBorder(1, 1, 1, 1)));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title2);
-
-        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1), new EmptyBorder(1, 1, 1, 1)),
-                                    new CompoundBorder(new EmptyBorder(1, 1, 1, 1), new EmptyBorder(1, 1, 1, 1)));
+        border = new CompoundBorder(new CompoundBorder(new TitledBorder(title1),
+                new EmptyBorder(1, 1, 1, 1)), new CompoundBorder(new EmptyBorder(1, 1, 1, 1),
+                new EmptyBorder(1, 1, 1, 1)));
         assertNotNull(aContext.getBorderTitle(border));
         assertEquals(aContext.getBorderTitle(border), title1);
     }
@@ -178,10 +175,8 @@
         String text1 = "text1";
         String text2 = "text2";
         assertNull(aContext.getAccessibleName());
-
         panel.setName(text2);
         assertNull(aContext.getAccessibleName());
-
         aContext.setAccessibleName(text1);
         assertEquals(aContext.getAccessibleName(), text1);
     }
@@ -192,17 +187,13 @@
     public void testGetAccessibleDescription() {
         String text1 = "text1";
         String text2 = "text2";
-
         panel = new JPanel();
-        aContext = (JComponent.AccessibleJComponent)panel.getAccessibleContext();
+        aContext = (JComponent.AccessibleJComponent) panel.getAccessibleContext();
         assertNull(aContext.getAccessibleDescription());
-
         aContext.setAccessibleDescription(text2);
         assertTrue(aContext.getAccessibleDescription().equals(text2));
-
         panel.setToolTipText(text1);
         assertTrue(aContext.getAccessibleDescription() != null);
         assertTrue(aContext.getAccessibleDescription().equals(text2));
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponent_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponent_MultithreadedTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponent_MultithreadedTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/AccessibleJComponent_MultithreadedTest.java Sat Nov 25 16:04:10 2006
@@ -25,41 +25,46 @@
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
 import java.lang.reflect.InvocationTargetException;
-
 import javax.accessibility.AccessibleContext;
 import javax.accessibility.AccessibleState;
 
 public class AccessibleJComponent_MultithreadedTest extends BasicSwingTestCase {
-
     protected JComponent panel;
+
     protected JFrame frame;
-    protected JComponent.AccessibleJComponent aContext;
 
+    protected JComponent.AccessibleJComponent aContext;
 
     protected class ConcreteFocusListener implements FocusListener {
         public boolean state = false;
+
         public void focusGained(final FocusEvent arg0) {
             state = true;
         }
+
         public void focusLost(final FocusEvent arg0) {
             state = true;
         }
     };
 
     protected class SynchronizedPropertyListener extends PropertyChangeController {
+        private static final long serialVersionUID = 1L;
+
         public final Object lock = new Object();
     }
 
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         frame = new JFrame();
         panel = new JPanel();
-        aContext = (JComponent.AccessibleJComponent)panel.getAccessibleContext();
+        aContext = (JComponent.AccessibleJComponent) panel.getAccessibleContext();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         panel = null;
         aContext = null;
@@ -85,7 +90,9 @@
     /*
      * Class under test for void removePropertyChangeListener(PropertyChangeListener)
      */
-    public void testRemovePropertyChangeListenerPropertyChangeListener() throws InterruptedException, InvocationTargetException {
+    @SuppressWarnings("deprecation")
+    public void testRemovePropertyChangeListenerPropertyChangeListener()
+            throws InterruptedException, InvocationTargetException {
         SynchronizedPropertyListener listener1 = new SynchronizedPropertyListener();
         SynchronizedPropertyListener listener2 = new SynchronizedPropertyListener();
         aContext.addPropertyChangeListener(listener1);
@@ -93,18 +100,18 @@
         JComponent button2 = new JPanel();
         panel.add(button1);
         waitListener(listener1);
-        listener1.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, button1.getAccessibleContext());
+        listener1.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                null, button1.getAccessibleContext());
         listener1.reset();
-
         aContext.addPropertyChangeListener(listener2);
         aContext.removePropertyChangeListener(listener1);
         panel.add(button2);
         waitListener(listener2);
         assertFalse(listener1.isChanged());
-        listener2.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, button2.getAccessibleContext());
+        listener2.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                null, button2.getAccessibleContext());
         listener1.reset();
         listener2.reset();
-
         ConcreteFocusListener focusListener = new ConcreteFocusListener();
         AccessibleContext bContext = button1.getAccessibleContext();
         bContext.addPropertyChangeListener(listener1);
@@ -114,11 +121,10 @@
         listener1.reset();
         frame.pack();
         frame.show();
-
         SwingWaitTestCase.requestFocusInWindowForComponent(button1);
-        listener1.checkLastPropertyFired(button1.getAccessibleContext(), AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
+        listener1.checkLastPropertyFired(button1.getAccessibleContext(),
+                AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
         listener1.reset();
-
         bContext.removePropertyChangeListener(listener1);
         SwingWaitTestCase.requestFocusInWindowForComponent(button2);
         assertFalse(listener1.isChanged());
@@ -127,29 +133,30 @@
     /*
      * Class under test for void addPropertyChangeListener(PropertyChangeListener)
      */
-    public void testAddPropertyChangeListenerPropertyChangeListener() throws InterruptedException, InvocationTargetException {
+    @SuppressWarnings("deprecation")
+    public void testAddPropertyChangeListenerPropertyChangeListener()
+            throws InterruptedException, InvocationTargetException {
         ConcreteFocusListener focusListener = new ConcreteFocusListener();
         SynchronizedPropertyListener listener = new SynchronizedPropertyListener();
-
         aContext.addPropertyChangeListener(listener);
         JComponent button1 = new JPanel();
         JComponent button2 = new JPanel();
         JComponent button3 = new JPanel();
         panel.add(button1);
         waitListener(listener);
-        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, button1.getAccessibleContext());
+        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                null, button1.getAccessibleContext());
         listener.reset();
-
         panel.add(button2);
         waitListener(listener);
-        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, button2.getAccessibleContext());
+        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                null, button2.getAccessibleContext());
         listener.reset();
-
         panel.remove(button1);
         waitListener(listener);
-        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, button1.getAccessibleContext(), null);
+        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                button1.getAccessibleContext(), null);
         listener.reset();
-
         panel.add(button1);
         AccessibleContext bContext = button1.getAccessibleContext();
         bContext.addPropertyChangeListener(listener);
@@ -159,68 +166,80 @@
         listener.reset();
         frame.pack();
         frame.show();
-
         SwingWaitTestCase.requestFocusInWindowForComponent(button1);
-        listener.checkLastPropertyFired(button1.getAccessibleContext(), AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
+        listener.checkLastPropertyFired(button1.getAccessibleContext(),
+                AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
         listener.reset();
-
         SwingWaitTestCase.requestFocusInWindowForComponent(button2);
-        listener.checkLastPropertyFired(button1.getAccessibleContext(), AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.FOCUSED, null);
+        listener.checkLastPropertyFired(button1.getAccessibleContext(),
+                AccessibleContext.ACCESSIBLE_STATE_PROPERTY, AccessibleState.FOCUSED, null);
         listener.reset();
-
         panel.add(button3);
         waitListener(listener);
-        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, button3.getAccessibleContext());
+        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                null, button3.getAccessibleContext());
         listener.reset();
-
         panel.remove(button2);
         waitListener(listener);
-        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, button2.getAccessibleContext(), null);
+        listener.checkLastPropertyFired(aContext, AccessibleContext.ACCESSIBLE_CHILD_PROPERTY,
+                button2.getAccessibleContext(), null);
         listener.reset();
-
         SwingWaitTestCase.requestFocusInWindowForComponent(button1);
-        listener.checkLastPropertyFired(button1.getAccessibleContext(), AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
+        listener.checkLastPropertyFired(button1.getAccessibleContext(),
+                AccessibleContext.ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.FOCUSED);
     }
 
     /*
      * Class under test for AccessibleStateSet getAccessibleStateSet()
      */
-    public void testGetAccessibleStateSet() throws InterruptedException, InvocationTargetException {
-        assertTrue("Enabled", aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertFalse("Focused", aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSED));
-        assertTrue("Focusable", aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertTrue("Visible", aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertFalse("Showing", aContext.getAccessibleStateSet().contains(AccessibleState.SHOWING));
+    @SuppressWarnings("deprecation")
+    public void testGetAccessibleStateSet() throws InterruptedException,
+            InvocationTargetException {
+        assertTrue("Enabled", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.ENABLED));
+        assertFalse("Focused", aContext.getAccessibleStateSet().contains(
+                AccessibleState.FOCUSED));
+        assertTrue("Focusable", aContext.getAccessibleStateSet().contains(
+                AccessibleState.FOCUSABLE));
+        assertTrue("Visible", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.VISIBLE));
+        assertFalse("Showing", aContext.getAccessibleStateSet().contains(
+                AccessibleState.SHOWING));
         assertTrue("Opaque", aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
         assertEquals("Number of states", 4, aContext.getAccessibleStateSet().toArray().length);
-
         frame.getContentPane().add(panel);
         frame.pack();
         frame.show();
         SwingWaitTestCase.requestFocusInWindowForComponent(panel);
-
-        assertTrue("Enabled", aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertTrue("Focused", aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSED));
-        assertTrue("Focusable", aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertTrue("Visible", aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertTrue("Showing", aContext.getAccessibleStateSet().contains(AccessibleState.SHOWING));
+        assertTrue("Enabled", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.ENABLED));
+        assertTrue("Focused", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.FOCUSED));
+        assertTrue("Focusable", aContext.getAccessibleStateSet().contains(
+                AccessibleState.FOCUSABLE));
+        assertTrue("Visible", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.VISIBLE));
+        assertTrue("Showing", aContext.getAccessibleStateSet()
+                .contains(AccessibleState.SHOWING));
         assertTrue("Opaque", aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
         assertEquals("Number of states", 6, aContext.getAccessibleStateSet().toArray().length);
-
         panel.setVisible(false);
         panel.setOpaque(false);
         panel.setEnabled(false);
         JButton button = new JButton();
         frame.getContentPane().add(button);
         SwingWaitTestCase.requestFocusInWindowForComponent(button);
-
-        assertFalse("Enabled", aContext.getAccessibleStateSet().contains(AccessibleState.ENABLED));
-        assertFalse("Focused", aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSED));
-        assertTrue("Focusable", aContext.getAccessibleStateSet().contains(AccessibleState.FOCUSABLE));
-        assertFalse("Visible", aContext.getAccessibleStateSet().contains(AccessibleState.VISIBLE));
-        assertFalse("Showing", aContext.getAccessibleStateSet().contains(AccessibleState.SHOWING));
+        assertFalse("Enabled", aContext.getAccessibleStateSet().contains(
+                AccessibleState.ENABLED));
+        assertFalse("Focused", aContext.getAccessibleStateSet().contains(
+                AccessibleState.FOCUSED));
+        assertTrue("Focusable", aContext.getAccessibleStateSet().contains(
+                AccessibleState.FOCUSABLE));
+        assertFalse("Visible", aContext.getAccessibleStateSet().contains(
+                AccessibleState.VISIBLE));
+        assertFalse("Showing", aContext.getAccessibleStateSet().contains(
+                AccessibleState.SHOWING));
         assertFalse("Opaque", aContext.getAccessibleStateSet().contains(AccessibleState.OPAQUE));
         assertEquals("Number of states", 1, aContext.getAccessibleStateSet().toArray().length);
     }
-
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapRTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapRTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapRTest.java Sat Nov 25 16:04:10 2006
@@ -22,21 +22,23 @@
 
 import java.awt.event.ActionEvent;
 
-
 public class ActionMapRTest extends SwingTestCase {
-
     public void testGet() {
         ActionMap map = new ActionMap();
         final AbstractAction action = new AbstractAction("result") {
-            public void actionPerformed(ActionEvent e) {
+            private static final long serialVersionUID = 1L;
 
+            public void actionPerformed(ActionEvent e) {
             }
         };
-        map.setParent(new ActionMap () {
+        map.setParent(new ActionMap() {
+            private static final long serialVersionUID = 1L;
+
+            @Override
             public Action get(Object key) {
                 return action;
             }
         });
-        assertSame(action, (Action)map.get("key"));
+        assertSame(action, map.get("key"));
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/ActionMapTest.java Sat Nov 25 16:04:10 2006
@@ -33,8 +33,9 @@
 import java.io.Serializable;
 
 public class ActionMapTest extends SwingTestCase {
+    private static class ActionProxy implements Action, Serializable {
+        private static final long serialVersionUID = 1L;
 
-    private static class ActionProxy implements Action, Serializable  {
         public String name = "";
 
         public ActionProxy() {
@@ -72,10 +73,9 @@
         }
 
         private void readObject(final ObjectInputStream inStream) throws IOException,
-                                                                   ClassNotFoundException  {
+                ClassNotFoundException {
             inStream.defaultReadObject();
         }
-
     }
 
     protected ActionMap map;
@@ -83,7 +83,7 @@
     protected boolean find(final Object[] array, final Object value) {
         boolean found = false;
         if (array != null) {
-            for (int i = 0; i < array.length; i++ ){
+            for (int i = 0; i < array.length; i++) {
                 if (array[i].equals(value)) {
                     found = true;
                     break;
@@ -96,6 +96,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         map = new ActionMap();
@@ -104,17 +105,14 @@
     public void testPut() {
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
-
         map.put("1", action1);
         map.put("2", action2);
         assertTrue(map.get("1") == action1);
         assertTrue(map.get("2") == action2);
-
         map.put("2", action1);
         map.put("1", action2);
         assertTrue(map.get("1") == action2);
         assertTrue(map.get("2") == action1);
-
         map.put("1", null);
         map.put("2", null);
         assertTrue(map.size() == 0);
@@ -124,33 +122,25 @@
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
         Action action3 = new ActionProxy();
-
         assertNull(map.get("1"));
         assertNull(map.get("2"));
-
         map.put("1", action1);
         map.put("2", action1);
         assertTrue(map.get("1") == action1);
         assertTrue(map.get("2") == action1);
-
         map.put("1", action2);
         assertTrue(map.get("1") == action2);
-
         map.put("1", null);
         assertNull(map.get("1"));
-
         map.clear();
         ActionMap childMap = new ActionMap();
         childMap.setParent(map);
-
         map.put("1", action1);
         childMap.put("2", action2);
         assertTrue(childMap.get("1") == action1);
         assertTrue(childMap.get("2") == action2);
-
         map.put("2", action3);
         assertTrue(childMap.get("2") == action2);
-
         childMap.put("1", action3);
         assertTrue(childMap.get("1") == action3);
     }
@@ -159,15 +149,11 @@
         ActionMap parent1 = new ActionMap();
         ActionMap parent2 = new ActionMap();
         ActionMap parent3 = null;
-
         assertNull(map.getParent());
-
         map.setParent(parent1);
         assertTrue(map.getParent() == parent1);
-
         map.setParent(parent3);
         assertTrue(map.getParent() == parent3);
-
         map.setParent(parent2);
         assertTrue(map.getParent() == parent2);
     }
@@ -175,16 +161,13 @@
     public void testRemove() {
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
-
         map.put("1", action1);
         map.put("2", action2);
         assertTrue(map.get("1") == action1);
         assertTrue(map.get("2") == action2);
-
         map.remove("2");
         assertNull(map.get("2"));
         assertTrue(map.get("1") == action1);
-
         map.remove("1");
         assertNull(map.get("1"));
         assertTrue(map.size() == 0);
@@ -194,13 +177,11 @@
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
         Object[] keys = map.keys();
-
         assertTrue(map.size() == 0);
         if (isHarmony()) {
             assertTrue(keys != null);
             assertTrue(keys.length == 0);
         }
-
         map.put("1", action1);
         map.put("2", action2);
         map.put("3", action1);
@@ -218,24 +199,20 @@
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
         Object[] keys = map.allKeys();
-
         map.setParent(parent);
         assertTrue(map.size() == 0);
         if (isHarmony()) {
             assertTrue(keys != null);
             assertTrue(keys.length == 0);
         }
-
         parent.put("1", action1);
         parent.put("2", action2);
         parent.put("3", action1);
         parent.put("4", action2);
-
         map.put("3", action1);
         map.put("4", action2);
         map.put("5", action1);
         map.put("6", action2);
-
         keys = map.allKeys();
         assertTrue(keys != null && keys.length == 6);
         assertTrue(find(keys, "1"));
@@ -249,20 +226,16 @@
     public void testClear() {
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
-
         assertTrue(map.size() == 0);
-
         map.put("1", action1);
         map.put("2", action2);
         assertTrue(map.size() == 2);
-
         map.clear();
         assertTrue(map.size() == 0);
         if (isHarmony()) {
             assertTrue("keys", map.keys() != null);
             assertTrue("keys", map.keys().length == 0);
         }
-
         map.put("1", action1);
         assertTrue(map.size() == 1);
     }
@@ -270,17 +243,13 @@
     public void testSize() {
         Action action1 = new ActionProxy();
         Action action2 = new ActionProxy();
-
         assertTrue(map.size() == 0);
-
         map.put("1", action1);
         map.put("2", action2);
         assertTrue(map.size() == 2);
-
         map.put("3", action1);
         map.put("4", action2);
         assertTrue(map.size() == 4);
-
         map.put("3", null);
         map.put("4", null);
         assertTrue(map.size() == 2);
@@ -297,7 +266,6 @@
         map.setParent(parent);
         map.put(object1, action1);
         map.put(object2, action2);
-
         ByteArrayOutputStream fo = new ByteArrayOutputStream();
         ObjectOutputStream so = new ObjectOutputStream(fo);
         so.writeObject(map);
@@ -325,10 +293,8 @@
         ActionMap ressurectedMap = (ActionMap) si.readObject();
         assertTrue(ressurectedMap.getParent() != null);
         assertTrue(ressurectedMap.get(object1) instanceof ActionProxy);
-        assertTrue(((ActionProxy) ressurectedMap.get(object1)).name
-                .equals(name1));
+        assertTrue(((ActionProxy) ressurectedMap.get(object1)).name.equals(name1));
         assertTrue(ressurectedMap.get(object2) instanceof ActionProxy);
-        assertTrue(((ActionProxy) ressurectedMap.get(object2)).name
-                .equals(name2));
+        assertTrue(((ActionProxy) ressurectedMap.get(object2)).name.equals(name2));
     }
 }



Mime
View raw message