Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalIntfcTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalIntfcTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalIntfcTests.java Mon Jul 7 19:07:41 2014 @@ -24,7 +24,7 @@ public class SingletonLocalIntfcTests ex } protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeLocal"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeLocal"); ejbLocalHome = (BasicSingletonLocalHome)obj; ejbLocalObject = ejbLocalHome.create(); } @@ -34,10 +34,10 @@ public class SingletonLocalIntfcTests ex // public void test01_businessMethod(){ try{ - String expected = "Success"; - String actual = ejbLocalObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbLocalObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -49,10 +49,10 @@ public class SingletonLocalIntfcTests ex public void test02_throwApplicationException(){ try{ ejbLocalObject.throwApplicationException(); - } catch (org.apache.openejb.test.ApplicationException e){ + } catch (final org.apache.openejb.test.ApplicationException e){ //Good. This is the correct behaviour return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("An ApplicationException should have been thrown."); @@ -64,10 +64,10 @@ public class SingletonLocalIntfcTests ex */ public void test03_invokeAfterApplicationException(){ try{ - String expected = "Success"; - String actual = ejbLocalObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbLocalObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -75,13 +75,13 @@ public class SingletonLocalIntfcTests ex public void test04_throwSystemException(){ try{ ejbLocalObject.throwSystemException_NullPointer(); - } catch (EJBException e){ + } catch (final EJBException e){ //Good, so far. assertNotNull("Nested exception should not be is null", e ); assertTrue("Nested exception should be an instance of NullPointerException, but exception is "+e.getCausedByException().getClass().getName(), (e.getCausedByException() instanceof NullPointerException)); return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("An EJBException encapsulating a NullPointerException should have been thrown."); @@ -96,13 +96,13 @@ public class SingletonLocalIntfcTests ex */ public void test05_invokeAfterSystemException(){ try{ - String expected = "Success"; - String actual = ejbLocalObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbLocalObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("The business method should have been executed."); - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } }
Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalTestSuite.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalTestSuite.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalTestSuite.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonLocalTestSuite.java Mon Jul 7 19:07:41 2014 @@ -24,12 +24,12 @@ import org.apache.openejb.test.FilteredT */ public class SingletonLocalTestSuite extends junit.framework.TestCase { - public SingletonLocalTestSuite(String name) { + public SingletonLocalTestSuite(final String name) { super(name); } public static junit.framework.Test suite() { - TestSuite suite = new FilteredTestSuite(); + final TestSuite suite = new FilteredTestSuite(); suite.addTest(new SingletonJndiTests()); suite.addTest(new SingletonPojoLocalJndiTests()); Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoContextLookupTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoContextLookupTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoContextLookupTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoContextLookupTests.java Mon Jul 7 19:07:41 2014 @@ -34,7 +34,7 @@ public class SingletonPojoContextLookupT protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/ContextLookupSingletonPojoBean"); + final Object obj = initialContext.lookup("client/tests/singleton/ContextLookupSingletonPojoBean"); ejbHome = (EncSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, EncSingletonHome.class); ejbObject = ejbHome.create(); @@ -50,7 +50,7 @@ public class SingletonPojoContextLookupT try { /*[1] Drop database table */ TestManager.getDatabase().dropEntityTable(); - } catch (Exception e){ + } catch (final Exception e){ throw e; } finally { super.tearDown(); @@ -60,9 +60,9 @@ public class SingletonPojoContextLookupT public void test01_lookupStringEntry() { try{ ejbObject.lookupStringEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -70,9 +70,9 @@ public class SingletonPojoContextLookupT public void test02_lookupDoubleEntry() { try{ ejbObject.lookupDoubleEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -80,9 +80,9 @@ public class SingletonPojoContextLookupT public void test03_lookupLongEntry() { try{ ejbObject.lookupLongEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -90,9 +90,9 @@ public class SingletonPojoContextLookupT public void test04_lookupFloatEntry() { try{ ejbObject.lookupFloatEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -100,9 +100,9 @@ public class SingletonPojoContextLookupT public void test05_lookupIntegerEntry() { try{ ejbObject.lookupIntegerEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -110,9 +110,9 @@ public class SingletonPojoContextLookupT public void test06_lookupShortEntry() { try{ ejbObject.lookupShortEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -120,9 +120,9 @@ public class SingletonPojoContextLookupT public void test07_lookupBooleanEntry() { try{ ejbObject.lookupBooleanEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -130,9 +130,9 @@ public class SingletonPojoContextLookupT public void test08_lookupByteEntry() { try{ ejbObject.lookupByteEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -140,9 +140,9 @@ public class SingletonPojoContextLookupT public void test09_lookupCharacterEntry() { try{ ejbObject.lookupCharacterEntry(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -150,9 +150,9 @@ public class SingletonPojoContextLookupT public void test10_lookupEntityBean() { try{ ejbObject.lookupEntityBean(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -160,9 +160,9 @@ public class SingletonPojoContextLookupT public void test11_lookupStatefulBean() { try{ ejbObject.lookupStatefulBean(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -170,9 +170,9 @@ public class SingletonPojoContextLookupT public void test12_lookupSingletonBean() { try{ ejbObject.lookupSingletonBean(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -180,9 +180,9 @@ public class SingletonPojoContextLookupT public void test13_lookupResource() { try{ ejbObject.lookupResource(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -190,9 +190,9 @@ public class SingletonPojoContextLookupT public void test14_lookupPersistenceUnit() { try{ ejbObject.lookupPersistenceUnit(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -200,9 +200,9 @@ public class SingletonPojoContextLookupT public void test15_lookupPersistenceContext() { try{ ejbObject.lookupPersistenceContext(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -210,9 +210,9 @@ public class SingletonPojoContextLookupT public void test18_lookupSessionContext() { try{ ejbObject.lookupSessionContext(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -220,9 +220,9 @@ public class SingletonPojoContextLookupT public void test23_lookupJMSConnectionFactory() { try{ ejbObject.lookupJMSConnectionFactory(); - } catch (TestFailureException e){ + } catch (final TestFailureException e){ throw e.error; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbHomeTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbHomeTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbHomeTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbHomeTests.java Mon Jul 7 19:07:41 2014 @@ -31,7 +31,7 @@ public class SingletonPojoEjbHomeTests e protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); } @@ -40,9 +40,9 @@ public class SingletonPojoEjbHomeTests e // public void test01_getEJBMetaData(){ try{ - EJBMetaData ejbMetaData = ejbHome.getEJBMetaData(); + final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData(); assertNotNull( "EJBMetaData is null", ejbMetaData ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -51,7 +51,7 @@ public class SingletonPojoEjbHomeTests e try{ ejbHomeHandle = ejbHome.getHomeHandle(); assertNotNull("The HomeHandle is null", ejbHomeHandle ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -91,10 +91,10 @@ public class SingletonPojoEjbHomeTests e public void test03_removeByPrimaryKey(){ try{ ejbHome.remove("primaryKey"); - } catch (RemoveException e){ + } catch (final RemoveException e){ assertTrue( true ); return; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception " + e.getClass() + " instead of javax.ejb.RemoveException : " + e.getMessage()); } assertTrue("javax.ejb.RemoveException should have been thrown", false ); Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalHomeTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalHomeTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalHomeTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalHomeTests.java Mon Jul 7 19:07:41 2014 @@ -73,10 +73,10 @@ public class SingletonPojoEjbLocalHomeTe public void test03_removeByPrimaryKey(){ try{ ejbLocalHome.remove("primaryKey"); - } catch (RemoveException e){ + } catch (final RemoveException e){ assertTrue( true ); return; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception " + e.getClass() + " instead of javax.ejb.RemoveException : " + e.getMessage()); } assertTrue("javax.ejb.RemoveException should have been thrown", false ); Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalObjectTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalObjectTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalObjectTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbLocalObjectTests.java Mon Jul 7 19:07:41 2014 @@ -27,7 +27,7 @@ public class SingletonPojoEjbLocalObject protected void setUp() throws Exception { super.setUp(); - Object obj = initialContext + final Object obj = initialContext .lookup("client/tests/singleton/BasicSingletonPojoHomeLocal"); ejbLocalHome = (BasicSingletonLocalHome) javax.rmi.PortableRemoteObject .narrow(obj, BasicSingletonLocalHome.class); @@ -44,16 +44,16 @@ public class SingletonPojoEjbLocalObject public void test01_isIdentical() { try { assertTrue("The EJBLocalObjects are not equal", ejbLocalObject.isIdentical(ejbLocalObject)); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } public void test02_getEjbLocalHome() { try { - EJBLocalHome localHome = ejbLocalObject.getEJBLocalHome(); + final EJBLocalHome localHome = ejbLocalObject.getEJBLocalHome(); assertNotNull("The EJBLocalHome is null", localHome); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } @@ -73,11 +73,11 @@ public class SingletonPojoEjbLocalObject */ public void test03_getPrimaryKey() { try { - Object key = ejbLocalObject.getPrimaryKey(); - } catch (javax.ejb.EJBException e) { + final Object key = ejbLocalObject.getPrimaryKey(); + } catch (final javax.ejb.EJBException e) { assertTrue(true); return; - } catch (Exception e) { + } catch (final Exception e) { fail("A RuntimeException should have been thrown. Received Exception " + e.getClass() + " : " + e.getMessage()); } fail("A RuntimeException should have been thrown."); @@ -88,7 +88,7 @@ public class SingletonPojoEjbLocalObject ejbLocalObject.remove(); // you can't really remove a singleton handle ejbLocalObject.businessMethod("Should not throw an exception"); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbMetaDataTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbMetaDataTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbMetaDataTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbMetaDataTests.java Mon Jul 7 19:07:41 2014 @@ -26,7 +26,7 @@ public class SingletonPojoEjbMetaDataTes protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); ejbMetaData = ejbHome.getEJBMetaData(); } @@ -37,19 +37,19 @@ public class SingletonPojoEjbMetaDataTes public void test01_getEJBHome(){ try{ - EJBHome home = ejbMetaData.getEJBHome(); + final EJBHome home = ejbMetaData.getEJBHome(); assertNotNull( "The EJBHome is null", home ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } public void test02_getHomeInterfaceClass(){ try{ - Class clazz = ejbMetaData.getHomeInterfaceClass(); + final Class clazz = ejbMetaData.getHomeInterfaceClass(); assertNotNull( "The Home Interface class is null", clazz ); assertEquals(clazz , BasicSingletonHome.class); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -68,12 +68,12 @@ public class SingletonPojoEjbMetaDataTes */ public void test03_getPrimaryKeyClass(){ try{ - Class clazz = ejbMetaData.getPrimaryKeyClass(); + final Class clazz = ejbMetaData.getPrimaryKeyClass(); assertNull("Should not return a primary key. Method should throw an java.lang.RuntimeException", clazz ); - } catch (UnsupportedOperationException e){ + } catch (final UnsupportedOperationException e){ assertTrue( true ); return; - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } assertTrue( "Method should throw an java.lang.RuntimeException", false ); @@ -81,10 +81,10 @@ public class SingletonPojoEjbMetaDataTes public void test04_getRemoteInterfaceClass(){ try{ - Class clazz = ejbMetaData.getRemoteInterfaceClass(); + final Class clazz = ejbMetaData.getRemoteInterfaceClass(); assertNotNull( "The Remote Interface class is null", clazz ); assertEquals(clazz , BasicSingletonObject.class); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -92,7 +92,7 @@ public class SingletonPojoEjbMetaDataTes public void test05_isSession(){ try{ assertTrue( "EJBMetaData says this is not a session bean", ejbMetaData.isSession() ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -101,7 +101,7 @@ public class SingletonPojoEjbMetaDataTes try{ // TODO: hopefully an isSingletonSession() method will get added to the EJB 3.1 API assertTrue( "EJBMetaData says this is not a singleton session bean", !ejbMetaData.isStatelessSession() ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbObjectTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbObjectTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbObjectTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoEjbObjectTests.java Mon Jul 7 19:07:41 2014 @@ -35,7 +35,7 @@ public class SingletonPojoEjbObjectTests protected void setUp() throws Exception { super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicSingletonHome.class); ejbObject = ejbHome.createObject(); } @@ -58,9 +58,9 @@ public class SingletonPojoEjbObjectTests */ public void test01_getEjbHome() { try { - EJBHome home = ejbObject.getEJBHome(); + final EJBHome home = ejbObject.getEJBHome(); assertNotNull("The EJBHome is null", home); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } @@ -72,7 +72,7 @@ public class SingletonPojoEjbObjectTests try { ejbHandle = ejbObject.getHandle(); assertNotNull("The Handle is null", ejbHandle); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } @@ -91,7 +91,7 @@ public class SingletonPojoEjbObjectTests otherEJBObject = ejbHome.createObject(); assertTrue("The EJBObjects are not identical", ejbObject.isIdentical(ejbObject)); assertTrue("The EJBObject and the OtherEJBObject are not identical", ejbObject.isIdentical(otherEJBObject)); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } @@ -105,7 +105,7 @@ public class SingletonPojoEjbObjectTests ejbObject.remove(); // you can't really remove a singleton handle ejbObject.businessMethod("Should not throw an exception"); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } @@ -115,11 +115,11 @@ public class SingletonPojoEjbObjectTests */ public void test05_getPrimaryKey() { try { - Object key = ejbObject.getPrimaryKey(); - } catch (java.rmi.RemoteException e) { + final Object key = ejbObject.getPrimaryKey(); + } catch (final java.rmi.RemoteException e) { assertTrue(true); return; - } catch (Exception e) { + } catch (final Exception e) { fail("A RuntimeException should have been thrown. Received Exception " + e.getClass() + " : " + e.getMessage()); } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHandleTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHandleTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHandleTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHandleTests.java Mon Jul 7 19:07:41 2014 @@ -26,7 +26,7 @@ public class SingletonPojoHandleTests ex protected void setUp() throws Exception { super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome) javax.rmi.PortableRemoteObject.narrow(obj, BasicSingletonHome.class); ejbObject = ejbHome.createObject(); ejbHandle = ejbObject.getHandle(); @@ -42,10 +42,10 @@ public class SingletonPojoHandleTests ex public void test01_getEJBObject() { try { - EJBObject object = ejbHandle.getEJBObject(); + final EJBObject object = ejbHandle.getEJBObject(); assertNotNull("The EJBObject is null", object); assertTrue("EJBObjects are not identical", object.isIdentical(ejbObject)); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } @@ -69,7 +69,7 @@ public class SingletonPojoHandleTests ex ejbHome.remove(ejbHandle); // you can't really remove a singleton handle ejbObject.businessMethod("Should not throw an exception"); - } catch (Exception e) { + } catch (final Exception e) { fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeHandleTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeHandleTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeHandleTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeHandleTests.java Mon Jul 7 19:07:41 2014 @@ -26,7 +26,7 @@ public class SingletonPojoHomeHandleTest protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); ejbHomeHandle = ejbHome.getHomeHandle(); } @@ -36,9 +36,9 @@ public class SingletonPojoHomeHandleTest // public void test01_getEJBHome(){ try{ - EJBHome home = ejbHomeHandle.getEJBHome(); + final EJBHome home = ejbHomeHandle.getEJBHome(); assertNotNull( "The EJBHome is null", home ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeIntfcTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeIntfcTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoHomeIntfcTests.java Mon Jul 7 19:07:41 2014 @@ -31,7 +31,7 @@ public class SingletonPojoHomeIntfcTests protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome) javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); } @@ -42,7 +42,7 @@ public class SingletonPojoHomeIntfcTests try{ ejbObject = ejbHome.createObject(); assertNotNull( "The EJBObject is null", ejbObject ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception " + e.getClass() + " : " + e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalHomeIntfcTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalHomeIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalHomeIntfcTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalHomeIntfcTests.java Mon Jul 7 19:07:41 2014 @@ -41,7 +41,7 @@ public class SingletonPojoLocalHomeIntfc try{ ejbLocalObject = ejbLocalHome.create(); assertNotNull( "The EJBObject is null", ejbLocalObject ); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalJndiTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalJndiTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalJndiTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoLocalJndiTests.java Mon Jul 7 19:07:41 2014 @@ -30,7 +30,7 @@ public class SingletonPojoLocalJndiTests public void test01_initialContext(){ try{ assertNotNull("The InitialContext reference is null.", initialContext); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -40,7 +40,7 @@ public class SingletonPojoLocalJndiTests // Here we use the Java casting as what is done while looking-up a local bean ejbLocalHome = (BasicSingletonLocalHome) initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeLocal"); assertNotNull("The EJBLocalHome is null", ejbLocalHome); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteIntrfcTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteIntrfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteIntrfcTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteIntrfcTests.java Mon Jul 7 19:07:41 2014 @@ -24,7 +24,7 @@ public class SingletonPojoRemoteIntrfcTe protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); ejbObject = ejbHome.createObject(); } @@ -34,10 +34,10 @@ public class SingletonPojoRemoteIntrfcTe // public void test01_businessMethod(){ try{ - String expected = "Success"; - String actual = ejbObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -49,10 +49,10 @@ public class SingletonPojoRemoteIntrfcTe public void test02_throwApplicationException(){ try{ ejbObject.throwApplicationException(); - } catch (org.apache.openejb.test.ApplicationException e){ + } catch (final org.apache.openejb.test.ApplicationException e){ assertTrue(true); return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("An ApplicationException should have been thrown."); @@ -64,10 +64,10 @@ public class SingletonPojoRemoteIntrfcTe */ public void test03_invokeAfterApplicationException(){ try{ - String expected = "Success"; - String actual = ejbObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -75,13 +75,13 @@ public class SingletonPojoRemoteIntrfcTe public void test04_throwSystemException(){ try{ ejbObject.throwSystemException_NullPointer(); - } catch (java.rmi.RemoteException e){ + } catch (final java.rmi.RemoteException e){ //Good, so far. - Throwable n = e.detail; + final Throwable n = e.detail; assertNotNull("Nested exception should not be is null", n ); assertTrue("Nested exception should be an instance of NullPointerException, but exception is "+n.getClass().getName(), (n instanceof NullPointerException)); return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("A NullPointerException should have been thrown."); @@ -97,13 +97,13 @@ public class SingletonPojoRemoteIntrfcTe public void test05_invokeAfterSystemException(){ try{ - String expected = "Success"; - String actual = ejbObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("The business method should have been executed."); - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteJndiTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteJndiTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteJndiTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonPojoRemoteJndiTests.java Mon Jul 7 19:07:41 2014 @@ -25,17 +25,17 @@ public class SingletonPojoRemoteJndiTest public void test01_initialContext(){ try{ assertNotNull("The InitialContext reference is null.", initialContext); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } public void test02_Jndi_lookupHome(){ try{ - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHome"); ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); assertNotNull("The EJBHome is null", ejbHome); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteBusinessIntfcTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteBusinessIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteBusinessIntfcTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteBusinessIntfcTests.java Mon Jul 7 19:07:41 2014 @@ -31,7 +31,7 @@ public class SingletonRemoteBusinessIntf // Test remote interface methods // public void test00_lookupBusinessInterface() throws Exception { - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeBusinessRemote"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonPojoHomeBusinessRemote"); assertNotNull(obj); assertTrue("instance of BasicSingletonBusinessRemote", obj instanceof BasicSingletonBusinessRemote); businessRemote = (BasicSingletonBusinessRemote) obj; @@ -39,19 +39,19 @@ public class SingletonRemoteBusinessIntf public void test01_businessMethod(){ try{ - String expected = "Success"; - String actual = businessRemote.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = businessRemote.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } try{ - Integer expected = new Integer(42); - Object actual = businessRemote.echo(expected); + final Integer expected = new Integer(42); + final Object actual = businessRemote.echo(expected); assertEquals(expected, actual); assertNotSame("pass by value", expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -63,10 +63,10 @@ public class SingletonRemoteBusinessIntf public void test02_throwApplicationException(){ try{ businessRemote.throwApplicationException(); - } catch (org.apache.openejb.test.ApplicationException e){ + } catch (final org.apache.openejb.test.ApplicationException e){ //Good. This is the correct behaviour return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("An ApplicationException should have been thrown."); @@ -78,10 +78,10 @@ public class SingletonRemoteBusinessIntf */ public void test03_invokeAfterApplicationException(){ try{ - String expected = "Success"; - String actual = businessRemote.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = businessRemote.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -90,13 +90,13 @@ public class SingletonRemoteBusinessIntf public void _test04_throwSystemException(){ try{ businessRemote.throwSystemException_NullPointer(); - } catch (Exception e){ + } catch (final Exception e){ //Good, so far. - Throwable n = e.getCause(); + final Throwable n = e.getCause(); assertNotNull("Nested exception should not be is null", n ); assertTrue("Nested exception should be an instance of NullPointerException, but exception is "+n.getClass().getName(), (n instanceof NullPointerException)); return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("A NullPointerException should have been thrown."); @@ -124,7 +124,7 @@ public class SingletonRemoteBusinessIntf //================================= public void test06_testRemove(){ - Object obj =businessRemote.remove(); + final Object obj =businessRemote.remove(); assertNotNull(obj); } Modified: tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteIntfcTests.java URL: http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteIntfcTests.java?rev=1608563&r1=1608562&r2=1608563&view=diff ============================================================================== --- tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteIntfcTests.java (original) +++ tomee/tomee/branches/tomee-1.7.x/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/singleton/SingletonRemoteIntfcTests.java Mon Jul 7 19:07:41 2014 @@ -29,7 +29,7 @@ public class SingletonRemoteIntfcTests e protected void setUp() throws Exception{ super.setUp(); - Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome"); + final Object obj = initialContext.lookup("client/tests/singleton/BasicSingletonHome"); ejbHome = (BasicSingletonHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicSingletonHome.class); ejbObject = ejbHome.createObject(); } @@ -39,10 +39,10 @@ public class SingletonRemoteIntfcTests e // public void test01_businessMethod(){ try{ - String expected = "Success"; - String actual = ejbObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Exception e){ + } catch (final Exception e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -54,10 +54,10 @@ public class SingletonRemoteIntfcTests e public void test02_throwApplicationException(){ try{ ejbObject.throwApplicationException(); - } catch (org.apache.openejb.test.ApplicationException e){ + } catch (final org.apache.openejb.test.ApplicationException e){ //Good. This is the correct behaviour return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("An ApplicationException should have been thrown."); @@ -69,10 +69,10 @@ public class SingletonRemoteIntfcTests e */ public void test03_invokeAfterApplicationException(){ try{ - String expected = "Success"; - String actual = ejbObject.businessMethod("sseccuS"); + final String expected = "Success"; + final String actual = ejbObject.businessMethod("sseccuS"); assertEquals(expected, actual); - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } } @@ -80,13 +80,13 @@ public class SingletonRemoteIntfcTests e public void test04_throwSystemException(){ try{ ejbObject.throwSystemException_NullPointer(); - } catch (java.rmi.RemoteException e){ + } catch (final java.rmi.RemoteException e){ //Good, so far. - Throwable n = e.detail; + final Throwable n = e.detail; assertNotNull("Nested exception should not be null", n ); assertTrue("Nested exception should be an instance of NullPointerException, but exception is "+n.getClass().getName(), n instanceof NullPointerException); return; - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } fail("A NullPointerException should have been thrown."); @@ -102,9 +102,9 @@ public class SingletonRemoteIntfcTests e try{ ejbObject.businessMethod("This refernce is invalid"); fail("A java.rmi.NoSuchObjectException should have been thrown."); - } catch (java.rmi.NoSuchObjectException e){ + } catch (final java.rmi.NoSuchObjectException e){ // Good. - } catch (Throwable e){ + } catch (final Throwable e){ fail("Received Exception "+e.getClass()+ " : "+e.getMessage()); } }
