Index: test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java (working copy) @@ -167,24 +167,24 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.firePropertyChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); assertNull(l2.lastEvent); support.addPropertyChangeListener(propName, l2); l1.clearLastEvent(); l2.clearLastEvent(); support.firePropertyChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); - assertEquals(l2.lastEvent.getPropertyName(), propName); - assertSame(l2.lastEvent.getOldValue(), oldValue); - assertSame(l2.lastEvent.getNewValue(), newValue); - assertSame(l2.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); + assertEquals(propName, l2.lastEvent.getPropertyName()); + assertSame(oldValue, l2.lastEvent.getOldValue()); + assertSame(newValue, l2.lastEvent.getNewValue()); + assertSame(support, l2.lastEvent.getSource()); l1.clearLastEvent(); l2.clearLastEvent(); @@ -233,24 +233,24 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.fireVetoableChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); assertNull(l2.lastEvent); support.addVetoableChangeListener(propName, l2); l1.clearLastEvent(); l2.clearLastEvent(); support.fireVetoableChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); - assertEquals(l2.lastEvent.getPropertyName(), propName); - assertSame(l2.lastEvent.getOldValue(), oldValue); - assertSame(l2.lastEvent.getNewValue(), newValue); - assertSame(l2.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); + assertEquals(propName, l2.lastEvent.getPropertyName()); + assertSame(oldValue, l2.lastEvent.getOldValue()); + assertSame(newValue, l2.lastEvent.getNewValue()); + assertSame(support, l2.lastEvent.getSource()); l1.clearLastEvent(); l2.clearLastEvent(); @@ -297,10 +297,10 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.firePropertyChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); assertNull(l2.lastEvent); } @@ -334,10 +334,10 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.firePropertyChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); + assertEquals(propName, l1.lastEvent.getPropertyName()); assertNull(l1.lastEvent.getOldValue()); assertNull(l1.lastEvent.getNewValue()); - assertSame(l1.lastEvent.getSource(), support); + assertSame(support, l1.lastEvent.getSource()); assertNull(l2.lastEvent); } @@ -359,10 +359,10 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.fireVetoableChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); assertNull(l2.lastEvent); } @@ -387,18 +387,18 @@ } catch (PropertyVetoException e) { // expected } - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), newValue); - assertSame(l1.lastEvent.getNewValue(), oldValue); - assertSame(l1.lastEvent.getSource(), support); - assertEquals(l2.lastEvent.getPropertyName(), propName); - assertSame(l2.lastEvent.getOldValue(), newValue); - assertSame(l2.lastEvent.getNewValue(), oldValue); - assertSame(l2.lastEvent.getSource(), support); - assertEquals(l3.lastEvent.getPropertyName(), propName); - assertSame(l3.lastEvent.getOldValue(), newValue); - assertSame(l3.lastEvent.getNewValue(), oldValue); - assertSame(l3.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(newValue, l1.lastEvent.getOldValue()); + assertSame(oldValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); + assertEquals(propName, l2.lastEvent.getPropertyName()); + assertSame(newValue, l2.lastEvent.getOldValue()); + assertSame(oldValue, l2.lastEvent.getNewValue()); + assertSame(support, l2.lastEvent.getSource()); + assertEquals(propName, l3.lastEvent.getPropertyName()); + assertSame(newValue, l3.lastEvent.getOldValue()); + assertSame(oldValue, l3.lastEvent.getNewValue()); + assertSame(support, l3.lastEvent.getSource()); } public void testFireVetoableChange_OldEqualsNew() @@ -433,10 +433,10 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.fireVetoableChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); + assertEquals(propName, l1.lastEvent.getPropertyName()); assertNull(l1.lastEvent.getOldValue()); assertNull(l1.lastEvent.getNewValue()); - assertSame(l1.lastEvent.getSource(), support); + assertSame(support, l1.lastEvent.getSource()); assertNull(l2.lastEvent); } @@ -448,7 +448,7 @@ assertSame(mockBeanContext, support.getBeanContext()); } - public void testGetBeanContextChildPeer() { + public void testGetBeanContextChildPeer() throws Exception { BeanContextChildSupport support = new MockBeanContextChildSupport(); assertSame(support, support.beanContextChildPeer); assertSame(support, support.getBeanContextChildPeer()); @@ -458,15 +458,9 @@ assertSame(mockChild, support.beanContextChildPeer); assertSame(mockChild, support.getBeanContextChildPeer()); - try { - BeanContextChildSupport sup = new BeanContextChildSupport(); + BeanContextChildSupport sup = new BeanContextChildSupport(); - if (!sup.getBeanContextChildPeer().equals(sup)) { - fail("The objects should be equal"); - } - } catch (Exception e) { - fail("Unexpected exception: " + e + " caused by: " + e.getCause()); - } + assertEquals(sup, sup.getBeanContextChildPeer()); } public void testInitializeBeanContextResources() @@ -498,7 +492,7 @@ assertSame(ctx2, support.lastReleaseBeanContext); } - public void testIsDelegated() { + public void testIsDelegated() throws Exception { BeanContextChildSupport support = new MockBeanContextChildSupport(); assertFalse(support.isDelegated()); @@ -509,15 +503,10 @@ support.beanContextChildPeer = support; assertFalse(support.isDelegated()); - try { - BeanContextChildSupport sup = new BeanContextChildSupport(); + BeanContextChildSupport sup = new BeanContextChildSupport(); - if (sup.isDelegated()) { - fail("Child is not supposed to be delegated"); - } - } catch (Exception e) { - fail("Unexpected exception: " + e + " caused by: " + e.getCause()); - } + assertFalse("Child is not supposed to be delegated", + sup.isDelegated()); } public void testReleaseBeanContextResources() throws PropertyVetoException { @@ -566,24 +555,24 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.firePropertyChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); - assertEquals(l2.lastEvent.getPropertyName(), propName); - assertSame(l2.lastEvent.getOldValue(), oldValue); - assertSame(l2.lastEvent.getNewValue(), newValue); - assertSame(l2.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); + assertEquals(propName, l2.lastEvent.getPropertyName()); + assertSame(oldValue, l2.lastEvent.getOldValue()); + assertSame(newValue, l2.lastEvent.getNewValue()); + assertSame(support, l2.lastEvent.getSource()); support.removePropertyChangeListener(propName, l1); l1.clearLastEvent(); l2.clearLastEvent(); support.firePropertyChange(propName, oldValue, newValue); assertNull(l1.lastEvent); - assertEquals(l2.lastEvent.getPropertyName(), propName); - assertSame(l2.lastEvent.getOldValue(), oldValue); - assertSame(l2.lastEvent.getNewValue(), newValue); - assertSame(l2.lastEvent.getSource(), support); + assertEquals(propName, l2.lastEvent.getPropertyName()); + assertSame(oldValue, l2.lastEvent.getOldValue()); + assertSame(newValue, l2.lastEvent.getNewValue()); + assertSame(support, l2.lastEvent.getSource()); support.removePropertyChangeListener(propName, l2); l1.clearLastEvent(); @@ -614,14 +603,14 @@ l1.clearLastEvent(); l2.clearLastEvent(); support.fireVetoableChange(propName, oldValue, newValue); - assertEquals(l1.lastEvent.getPropertyName(), propName); - assertSame(l1.lastEvent.getOldValue(), oldValue); - assertSame(l1.lastEvent.getNewValue(), newValue); - assertSame(l1.lastEvent.getSource(), support); - assertEquals(l2.lastEvent.getPropertyName(), propName); - assertSame(l2.lastEvent.getOldValue(), oldValue); - assertSame(l2.lastEvent.getNewValue(), newValue); - assertSame(l2.lastEvent.getSource(), support); + assertEquals(propName, l1.lastEvent.getPropertyName()); + assertSame(oldValue, l1.lastEvent.getOldValue()); + assertSame(newValue, l1.lastEvent.getNewValue()); + assertSame(support, l1.lastEvent.getSource()); + assertEquals(propName, l2.lastEvent.getPropertyName()); + assertSame(oldValue, l2.lastEvent.getOldValue()); + assertSame(newValue, l2.lastEvent.getNewValue()); + assertSame(support, l2.lastEvent.getSource()); support.removeVetoableChangeListener(propName, l1); l1.clearLastEvent(); @@ -689,14 +678,14 @@ support.setBeanContext(ctx); assertSame(ctx, support.getBeanContext()); assertSame(ctx, support.lastInitBeanContext); - assertEquals(l1.lastEvent.getPropertyName(), "beanContext"); + assertEquals("beanContext", l1.lastEvent.getPropertyName()); assertNull(l1.lastEvent.getOldValue()); - assertSame(l1.lastEvent.getNewValue(), ctx); - assertSame(l1.lastEvent.getSource(), peer); - assertEquals(l2.lastEvent.getPropertyName(), "beanContext"); + assertSame(ctx, l1.lastEvent.getNewValue()); + assertSame(peer, l1.lastEvent.getSource()); + assertEquals("beanContext", l2.lastEvent.getPropertyName()); assertNull(l2.lastEvent.getOldValue()); - assertSame(l2.lastEvent.getNewValue(), ctx); - assertSame(l2.lastEvent.getSource(), peer); + assertSame(ctx, l2.lastEvent.getNewValue()); + assertSame(peer, l2.lastEvent.getSource()); support.clearLastRecords(); l1.clearLastEvent(); @@ -714,14 +703,14 @@ assertNull(support.getBeanContext()); assertNull(support.lastInitBeanContext); assertSame(ctx, support.lastReleaseBeanContext); - assertEquals(l1.lastEvent.getPropertyName(), "beanContext"); + assertEquals("beanContext", l1.lastEvent.getPropertyName()); assertNull(l1.lastEvent.getNewValue()); - assertSame(l1.lastEvent.getOldValue(), ctx); - assertSame(l1.lastEvent.getSource(), peer); - assertEquals(l2.lastEvent.getPropertyName(), "beanContext"); + assertSame(ctx, l1.lastEvent.getOldValue()); + assertSame(peer, l1.lastEvent.getSource()); + assertEquals("beanContext", l2.lastEvent.getPropertyName()); assertNull(l2.lastEvent.getNewValue()); - assertSame(l2.lastEvent.getOldValue(), ctx); - assertSame(l2.lastEvent.getSource(), peer); + assertSame(ctx, l2.lastEvent.getOldValue()); + assertSame(peer, l2.lastEvent.getSource()); } public void testSetBeanContext_VetoedByListener() @@ -749,10 +738,10 @@ assertNull(support.lastInitBeanContext); assertNull(support.lastReleaseBeanContext); assertNull(l1.lastEvent); - assertEquals(l2.lastEvent.getPropertyName(), "beanContext"); - assertSame(l2.lastEvent.getNewValue(), oldCtx); - assertSame(l2.lastEvent.getOldValue(), ctx); - assertSame(l2.lastEvent.getSource(), support); + assertEquals("beanContext", l2.lastEvent.getPropertyName()); + assertSame(oldCtx, l2.lastEvent.getNewValue()); + assertSame(ctx, l2.lastEvent.getOldValue()); + assertSame(support, l2.lastEvent.getSource()); assertTrue(support.rejectedSetBCOnce()); } Index: test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextServicesSupportTest.java (working copy) @@ -406,9 +406,9 @@ */ public void testBeanContextServicesSupport() { MockBeanContextServicesSupport support = new MockBeanContextServicesSupport(); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); assertNull(support.proxy()); - assertTrue(support.serializable() == 0); + assertEquals(0, support.serializable()); assertTrue(support.services().isEmpty()); assertSame(support, support.getBeanContextServicesPeer()); assertSame(Locale.getDefault(), support.getLocale()); @@ -423,9 +423,9 @@ MockBeanContextServices services = new MockBeanContextServices(); MockBeanContextServicesSupport support = new MockBeanContextServicesSupport( services); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); assertNull(support.proxy()); - assertTrue(support.serializable() == 0); + assertEquals(0, support.serializable()); assertTrue(support.services().isEmpty()); assertSame(services, support.getBeanContextServicesPeer()); assertSame(Locale.getDefault(), support.getLocale()); @@ -441,9 +441,9 @@ MockBeanContextServices services = new MockBeanContextServices(); MockBeanContextServicesSupport support = new MockBeanContextServicesSupport( services, Locale.ITALY); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); assertNull(support.proxy()); - assertTrue(support.serializable() == 0); + assertEquals(0, support.serializable()); assertTrue(support.services().isEmpty()); assertSame(services, support.getBeanContextServicesPeer()); assertSame(Locale.ITALY, support.getLocale()); @@ -459,9 +459,9 @@ MockBeanContextServices services = new MockBeanContextServices(); MockBeanContextServicesSupport support = new MockBeanContextServicesSupport( services, Locale.ITALY, true); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); assertNull(support.proxy()); - assertTrue(support.serializable() == 0); + assertEquals(0, support.serializable()); assertTrue(support.services().isEmpty()); assertSame(services, support.getBeanContextServicesPeer()); assertSame(Locale.ITALY, support.getLocale()); @@ -477,9 +477,9 @@ MockBeanContextServices services = new MockBeanContextServices(); MockBeanContextServicesSupport support = new MockBeanContextServicesSupport( services, Locale.ITALY, true, true); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); assertNull(support.proxy()); - assertTrue(support.serializable() == 0); + assertEquals(0, support.serializable()); assertTrue(support.services().isEmpty()); assertSame(services, support.getBeanContextServicesPeer()); assertSame(Locale.ITALY, support.getLocale()); @@ -1088,14 +1088,14 @@ public void testRemoveBeanContextServicesListener() { MockBeanContextServicesSupport support = new MockBeanContextServicesSupport(); MockBeanContextServicesListener l = new MockBeanContextServicesListener(); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); support.addBeanContextServicesListener(l); - assertTrue(support.bcsListeners().size() == 1); + assertEquals(1, support.bcsListeners().size()); assertSame(l, support.bcsListeners().get(0)); support.removeBeanContextServicesListener(l); - assertTrue(support.bcsListeners().size() == 0); + assertEquals(0, support.bcsListeners().size()); } public void testRevokeService_NullParam() { @@ -1184,7 +1184,7 @@ l2.clearLastEvent(); support.revokeService(Collection.class, provider, false); - assertTrue(support.services().size() == 0); + assertEquals(0, support.services().size()); support.records.assertEndOfRecords(); childSupport.records.assertEndOfRecords(); Index: test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/BeanDescriptorTest.java (working copy) @@ -204,6 +204,6 @@ */ public void testNullaryConstructor() { BeanDescriptor bd = new BeanDescriptor(String.class); - assertEquals(bd.getName(), "String"); + assertEquals("String", bd.getName()); } } Index: test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/EventHandlerTest.java (working copy) @@ -202,7 +202,7 @@ listener.fireSampleEvent(event); assertEquals("doSomething", getMethodName()); - assertTrue(event.getI() == invocationObject.getIntValue()); + assertEquals(event.getI(), invocationObject.getIntValue()); } /** Index: test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java (working copy) @@ -650,7 +650,7 @@ PropertyDescriptor[] pds2 = info.getPropertyDescriptors(); assertEquals(pds.length, pds2.length); for (int i = 0; i < pds.length; i++) { - assertTrue(pds[i].equals(pds2[i])); + assertEquals(pds[i], pds2[i]); } } @@ -681,7 +681,7 @@ PropertyDescriptor[] pds = info.getPropertyDescriptors(); for (PropertyDescriptor element : pds) { String name = element.getName(); - assertEquals(name, "text.MockFooLabelBeanInfo"); + assertEquals("text.MockFooLabelBeanInfo", name); } String[] path = Introspector.getBeanInfoSearchPath(); Index: test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/PropertyDescriptorTest.java (working copy) @@ -592,16 +592,16 @@ PropertyDescriptor pd = new PropertyDescriptor( "prop1", SubMockJavaBean.class, null, "setPropertyOne"); //$NON-NLS-1$ //$NON-NLS-2$ assertNull(pd.getReadMethod()); - assertEquals(pd.getWriteMethod().getName(), "setPropertyOne"); //$NON-NLS-1$ + assertEquals("setPropertyOne", pd.getWriteMethod().getName()); //$NON-NLS-1$ pd = new PropertyDescriptor( "prop1", SubMockJavaBean.class, "getPropertyOne", "setPropertyOne"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - assertEquals(pd.getReadMethod().getName(), "getPropertyOne"); //$NON-NLS-1$ - assertEquals(pd.getWriteMethod().getName(), "setPropertyOne"); //$NON-NLS-1$ + assertEquals("getPropertyOne", pd.getReadMethod().getName()); //$NON-NLS-1$ + assertEquals("setPropertyOne", pd.getWriteMethod().getName()); //$NON-NLS-1$ pd = new PropertyDescriptor( "prop1", SubMockJavaBean.class, "getPropertyOne", null); //$NON-NLS-1$ //$NON-NLS-2$ - assertEquals(pd.getReadMethod().getName(), "getPropertyOne"); //$NON-NLS-1$ + assertEquals("getPropertyOne", pd.getReadMethod().getName()); //$NON-NLS-1$ assertNull(pd.getWriteMethod()); } Index: test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java (working copy) @@ -1163,9 +1163,9 @@ try { support.fireVetoableChange("propName", 0, 1); } catch (PropertyVetoException pve) { - assertTrue("Illegal sequence:" + sb, sb.toString().equals("abBaAb")); + assertEquals("Illegal sequence:" + sb, "abBaAb", sb.toString()); String message = pve.getMessage(); - assertTrue("Illegal exception:" + message, message.equals(B_THROW)); + assertEquals("Illegal exception:" + message, B_THROW, message); return; } fail("Unreachable path:" + sb); Index: test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/XMLDecoderTest.java (working copy) @@ -250,7 +250,7 @@ "/xml/MockBean4Owner_SetOwner.xml"), o1); MockBean4Owner_Target t1 = (MockBean4Owner_Target) dec1.readObject(); - assertEquals(o1.getV(), 1); + assertEquals(1, o1.getV()); assertEquals(o1, t1.getV()); } @@ -260,7 +260,7 @@ "/xml/MockBean4Owner_SetOwnerWithWriteStatement.xml"), o2); MockBean4Owner_Target t2 = (MockBean4Owner_Target) dec2.readObject(); - assertEquals(o2.getV(), 999); + assertEquals(999, o2.getV()); assertEquals(o2, t2.getV()); } Index: test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java =================================================================== --- test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java (revision 467956) +++ test/java/org/apache/harmony/beans/tests/java/beans/XMLEncoderTest.java (working copy) @@ -313,7 +313,7 @@ }; XMLEncoder enc = new XMLEncoder(out); enc.writeObject(new Integer(3)); - assertTrue(out.size() == 0); + assertEquals(0, out.size()); enc.close(); @@ -331,7 +331,7 @@ XMLEncoder enc = new XMLEncoder(out); Integer i = new Integer(3); enc.writeObject(i); - assertTrue(out.size() == 0); + assertEquals(0, out.size()); assertNotNull(enc.get(i)); enc.flush();