svn commit: r1839288 [13/20] - in /db/torque/torque4/trunk: torque-ant-tasks/src/main/java/org/apache/torque/ant/task/ torque-generator/src/main/java/org/apache/torque/generator/configuration/ torque-generator/src/main/java/org/apache/torque/generator/...

classic Classic list List threaded Threaded
1 message Options
tv
Reply | Threaded
Open this post in threaded view
|

svn commit: r1839288 [13/20] - in /db/torque/torque4/trunk: torque-ant-tasks/src/main/java/org/apache/torque/ant/task/ torque-generator/src/main/java/org/apache/torque/generator/configuration/ torque-generator/src/main/java/org/apache/torque/generator/...

tv
Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriteriaTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriteriaTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriteriaTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriteriaTest.java Mon Aug 27 09:48:33 2018
@@ -204,9 +204,9 @@ public class CriteriaTest extends BaseTe
 
         // Add the string
         c.where(column1, value1a)
-            .and(column1, value1b)
-            .and(column2, value2a)
-            .and(column2, value2b);
+        .and(column1, value1b)
+        .and(column2, value2a)
+        .and(column2, value2b);
 
         // Verify that the Criterion is a composite
         assertTrue(c.getTopLevelCriterion().isComposite());
@@ -358,28 +358,28 @@ public class CriteriaTest extends BaseTe
         final String value5 = "myValue5";
 
         Criterion crit2 =
-            new Criterion(column2, value2, Criteria.EQUAL);
+                new Criterion(column2, value2, Criteria.EQUAL);
         Criterion crit3 =
-            new Criterion(column3, value3, Criteria.EQUAL);
+                new Criterion(column3, value3, Criteria.EQUAL);
         Criterion crit4 =
-            new Criterion(column4, value4, Criteria.EQUAL);
+                new Criterion(column4, value4, Criteria.EQUAL);
         Criterion crit5 =
-            new Criterion(column5, value5, Criteria.EQUAL);
+                new Criterion(column5, value5, Criteria.EQUAL);
 
         crit2.and(crit3).or(crit4.and(crit5));
         c.where(crit2);
         c.addSelectColumn(new ColumnImpl(null, "myTable2", null, "*"));
 
         String expect =
-            "SELECT * FROM myTable2, myTable3, myTable4, myTable5 WHERE "
-            + "((myTable2.myColumn2=? "
-                + "AND myTable3.myColumn3=?) "
-            + "OR (myTable4.myColumn4=? "
-                + "AND myTable5.myColumn5=?))";
+                "SELECT * FROM myTable2, myTable3, myTable4, myTable5 WHERE "
+                        + "((myTable2.myColumn2=? "
+                        + "AND myTable3.myColumn3=?) "
+                        + "OR (myTable4.myColumn4=? "
+                        + "AND myTable5.myColumn5=?))";
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(expect, result.toString());
         List<Object> preparedStatementReplacements
-            = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(4, preparedStatementReplacements.size());
         assertEquals("myValue2", preparedStatementReplacements.get(0));
         assertEquals("myValue3", preparedStatementReplacements.get(1));
@@ -427,15 +427,15 @@ public class CriteriaTest extends BaseTe
         c.where(crit2);
         c.addSelectColumn(new ColumnImpl(null, "myTable2", null, "*"));
         String expect =
-            "SELECT * FROM myTable2, myTable3, myTable4, myTable5 WHERE "
-                + "(((myTable2.myColumn2<? "
-                    + "AND myTable3.myColumn3<=?) "
-                + "OR myTable4.myColumn4>?) "
-                    + "AND myTable5.myColumn5>=?)";
+                "SELECT * FROM myTable2, myTable3, myTable4, myTable5 WHERE "
+                        + "(((myTable2.myColumn2<? "
+                        + "AND myTable3.myColumn3<=?) "
+                        + "OR myTable4.myColumn4>?) "
+                        + "AND myTable5.myColumn5>=?)";
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(expect, result.toString());
         List<Object> preparedStatementReplacements
-            = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(4, preparedStatementReplacements.size());
         assertEquals("myValue2", preparedStatementReplacements.get(0));
         assertEquals("myValue3", preparedStatementReplacements.get(1));
@@ -458,8 +458,8 @@ public class CriteriaTest extends BaseTe
                 Criteria.LESS_EQUAL);
         c.where(cn1).and(cn2);
         String expect =
-            "SELECT  FROM INVOICE WHERE "
-            + "(INVOICE.COST>=? AND INVOICE.COST<=?)";
+                "SELECT  FROM INVOICE WHERE "
+                        + "(INVOICE.COST>=? AND INVOICE.COST<=?)";
         Query result = SqlBuilder.buildQuery(c);
 
         assertEquals(expect, result.toString());
@@ -490,9 +490,9 @@ public class CriteriaTest extends BaseTe
         Query result = SqlBuilder.buildQuery(c);
 
         String expect = "SELECT * FROM TABLE WHERE "
-            + "(UPPER(TABLE.COLUMN1)=UPPER(?)"
-            + " AND UPPER(TABLE.COLUMN2)=UPPER(?)"
-            + " AND TABLE.COLUMN3=? AND TABLE.COLUMN4=?)";
+                + "(UPPER(TABLE.COLUMN1)=UPPER(?)"
+                + " AND UPPER(TABLE.COLUMN2)=UPPER(?)"
+                + " AND TABLE.COLUMN3=? AND TABLE.COLUMN4=?)";
         assertEquals(expect, result.toString());
         List<Object> replacements = result.getPreparedStatementReplacements();
         assertEquals(4, replacements.size());
@@ -516,7 +516,7 @@ public class CriteriaTest extends BaseTe
                 "SELECT  FROM TABLE WHERE TABLE.COLUMN=?",
                 result.toString());
         List<Object> preparedStatementReplacements
-            = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(1, preparedStatementReplacements.size());
         assertEquals(Boolean.TRUE, preparedStatementReplacements.get(0));
     }
@@ -536,7 +536,7 @@ public class CriteriaTest extends BaseTe
                 "SELECT  FROM TABLE WHERE TABLE.COLUMN=?",
                 result.toString());
         List<Object> preparedStatementReplacements
-            = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(1, preparedStatementReplacements.size());
         assertEquals(Boolean.TRUE, preparedStatementReplacements.get(0));
     }
@@ -546,7 +546,7 @@ public class CriteriaTest extends BaseTe
      */
     public void testWhereDate() throws TorqueException
     {
-         c.whereDate(new ColumnImpl("TABLE", "DATE_COLUMN"), 2003, 0, 22);
+        c.whereDate(new ColumnImpl("TABLE", "DATE_COLUMN"), 2003, 0, 22);
 
         Query result = SqlBuilder.buildQuery(c);
 
@@ -554,7 +554,7 @@ public class CriteriaTest extends BaseTe
                 "SELECT  FROM TABLE WHERE TABLE.DATE_COLUMN=?",
                 result.toString());
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(1, preparedStatementReplacements.size());
         assertEquals(
                 new GregorianCalendar(2003, 0, 22).getTime(),
@@ -580,10 +580,10 @@ public class CriteriaTest extends BaseTe
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(
                 "SELECT  FROM TABLE WHERE "
-                    + "(TABLE.DATE_COLUMN>? AND TABLE.DATE_COLUMN<?)",
-                result.toString());
+                        + "(TABLE.DATE_COLUMN>? AND TABLE.DATE_COLUMN<?)",
+                        result.toString());
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(2, preparedStatementReplacements.size());
         assertEquals(
                 new GregorianCalendar(2003, 0, 22).getTime(),
@@ -605,11 +605,11 @@ public class CriteriaTest extends BaseTe
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(
                 "SELECT  FROM TABLE WHERE "
-                    + "TABLE.DATE_COLUMN=?",
-                result.toString());
+                        + "TABLE.DATE_COLUMN=?",
+                        result.toString());
 
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(1, preparedStatementReplacements.size());
         assertEquals(
                 new GregorianCalendar(2003, 0, 22).getTime(),
@@ -624,11 +624,11 @@ public class CriteriaTest extends BaseTe
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(
                 "SELECT COUNT(*) FROM TABLE WHERE "
-                    + "TABLE.DATE_COLUMN=CURRENT_DATE",
-                result.toString());
+                        + "TABLE.DATE_COLUMN=CURRENT_DATE",
+                        result.toString());
 
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(0, preparedStatementReplacements.size());
     }
 
@@ -640,11 +640,11 @@ public class CriteriaTest extends BaseTe
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(
                 "SELECT COUNT(*) FROM TABLE WHERE "
-                    + "TABLE.TIME_COLUMN=CURRENT_TIME",
-                result.toString());
+                        + "TABLE.TIME_COLUMN=CURRENT_TIME",
+                        result.toString());
 
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(0, preparedStatementReplacements.size());
     }
 
@@ -656,7 +656,7 @@ public class CriteriaTest extends BaseTe
 
         Query result = SqlBuilder.buildQuery(c);
         String expect
-            = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
+        = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
                 + " LIMIT 5 OFFSET 3";
         assertEquals(expect, result.toString());
     }
@@ -670,7 +670,7 @@ public class CriteriaTest extends BaseTe
 
         Query result = SqlBuilder.buildQuery(c);
         String expect
-            = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
+        = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
                 + " OFFSET 3";
         assertEquals(expect, result.toString());
     }
@@ -687,7 +687,7 @@ public class CriteriaTest extends BaseTe
 
         Query result = SqlBuilder.buildQuery(c);
         String expect
-            = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
+        = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
                 + " LIMIT 18446744073709551615 OFFSET 3";
         assertEquals(expect, result.toString());
     }
@@ -700,7 +700,7 @@ public class CriteriaTest extends BaseTe
 
         Query result = SqlBuilder.buildQuery(c);
         String expect
-            = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
+        = "SELECT COUNT(*) FROM TABLE WHERE TABLE.DATE_COLUMN=?"
                 + " LIMIT 5";
         assertEquals(expect, result.toString());
     }
@@ -719,11 +719,11 @@ public class CriteriaTest extends BaseTe
         Query result = SqlBuilder.buildQuery(c);
         assertEquals(
                 "SELECT  FROM TABLE WHERE "
-                    + "TABLE.COLUMN=?",
-                result.toString());
+                        + "TABLE.COLUMN=?",
+                        result.toString());
 
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(1, preparedStatementReplacements.size());
         assertEquals(
                 "no wildcards",
@@ -758,7 +758,7 @@ public class CriteriaTest extends BaseTe
         assertTrue(result.toString().equals(firstExpect)
                 || result.toString().equals(secondExpect));
         List<Object> preparedStatementReplacements
-                = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(1, preparedStatementReplacements.size());
         assertEquals("no wildcards", preparedStatementReplacements.get(0));
     }
@@ -841,7 +841,7 @@ public class CriteriaTest extends BaseTe
         assertEquals(new ColumnImpl("Author", "NAME"),
                 asColumnsClone.get("AUTHOR_NAME"));
         assertEquals(c.getAsColumns(), cClone.getAsColumns());
-        List<FromElement>fromElementsClone = new UniqueList<FromElement>();
+        List<FromElement>fromElementsClone = new UniqueList<>();
         fromElementsClone.add(new FromElement("Author"));
         assertEquals(c.getFromElements(), fromElementsClone);
 
@@ -1004,12 +1004,12 @@ public class CriteriaTest extends BaseTe
 
         Query result = SqlBuilder.buildQuery(c);
         assertEquals("SELECT AUTHOR.NAME, a.NAME "
-                    + "FROM AUTHOR, AUTHOR a "
-                    + "WHERE AUTHOR.AUTHOR_ID=a.AUTHOR_ID "
-                    + "ORDER BY a.NAME ASC",
+                + "FROM AUTHOR, AUTHOR a "
+                + "WHERE AUTHOR.AUTHOR_ID=a.AUTHOR_ID "
+                + "ORDER BY a.NAME ASC",
                 result.toString());
         List<Object> preparedStatementReplacements
-            = result.getPreparedStatementReplacements();
+        = result.getPreparedStatementReplacements();
         assertEquals(0, preparedStatementReplacements.size());
     }
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/CriterionTest.java Mon Aug 27 09:48:33 2018
@@ -72,7 +72,7 @@ public class CriterionTest extends BaseT
         assertEquals("myTable.myColumn=myValue "
                 + "OR (myTable.myColumn2<myValue2 "
                 + "AND myTable.myColumn3>=3)",
-            criterion.toString());
+                criterion.toString());
     }
 
     /**

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/JoinTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/JoinTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/JoinTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/criteria/JoinTest.java Mon Aug 27 09:48:33 2018
@@ -54,7 +54,7 @@ public class JoinTest extends BaseTestCa
                 Criteria.NOT_EQUAL,
                 Criteria.LEFT_JOIN);
         assertEquals(" LEFT JOIN (null, null): "
-                    + "myTable1.myColumn1<>myTable2.myColumn2",
+                + "myTable1.myColumn1<>myTable2.myColumn2",
                 join.toString());
     }
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/AbstractBaseManagerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/AbstractBaseManagerTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/AbstractBaseManagerTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/AbstractBaseManagerTest.java Mon Aug 27 09:48:33 2018
@@ -33,41 +33,41 @@ import org.apache.torque.om.ObjectKey;
 import org.apache.torque.om.SimpleKey;
 
 public class AbstractBaseManagerTest extends TestCase
- implements CacheListener<TestPersistent>
+implements CacheListener<TestPersistent>
 {
- private static final ObjectKey TEST_PRIMARY_KEY = SimpleKey.keyFor("testID");
- private static final String CACHE_REGION = "testCache1";
- private TestManager manager;
+    private static final ObjectKey TEST_PRIMARY_KEY = SimpleKey.keyFor("testID");
+    private static final String CACHE_REGION = "testCache1";
+    private TestManager manager;
 
- private boolean addedObjectCalled;
- private boolean refreshedObjectCalled;
+    private boolean addedObjectCalled;
+    private boolean refreshedObjectCalled;
     private boolean removedObjectCalled;
 
- static
- {
+    static
+    {
         try
         {
- org.apache.torque.Torque.init(BaseTestCase.CONFIG_FILE);
- org.apache.torque.Torque.getConfiguration().setProperty(Torque.CACHE_KEY, Boolean.TRUE);
- }
+            org.apache.torque.Torque.init(BaseTestCase.CONFIG_FILE);
+            org.apache.torque.Torque.getConfiguration().setProperty(Torque.CACHE_KEY, Boolean.TRUE);
+        }
         catch (TorqueException e)
         {
- e.printStackTrace();
- }
- }
+            e.printStackTrace();
+        }
+    }
 
- /* CacheListener methods */
- @Override
+    /* CacheListener methods */
+    @Override
     public void addedObject(TestPersistent om)
- {
- this.addedObjectCalled = true;
- }
+    {
+        this.addedObjectCalled = true;
+    }
 
- @Override
+    @Override
     public void refreshedObject(TestPersistent om)
- {
- this.refreshedObjectCalled = true;
- }
+    {
+        this.refreshedObjectCalled = true;
+    }
 
     @Override
     public void removedObject(TestPersistent om)
@@ -77,127 +77,127 @@ public class AbstractBaseManagerTest ext
 
     @Override
     public List<Column> getInterestedFields()
- {
-    List<Column> columnList = new ArrayList<Column>(2);
- columnList.add(new ColumnImpl("test1"));
- columnList.add(new ColumnImpl("test2"));
- return columnList;
- }
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- this.manager = new TestManager();
- this.manager.setOMClass(TestPersistent.class);
- this.manager.setRegion(CACHE_REGION);
- }
-
- /**
- * @see junit.framework.TestCase#tearDown()
- */
- @Override
- protected void tearDown() throws Exception
- {
- manager.cache.clear();
- super.tearDown();
- }
-
- public void testGetOMInstance() throws TorqueException
- {
- TestPersistent test = manager.getOMInstance();
- assertNotNull("Instance should not be null", test);
- assertTrue("Instance should be a TestPersistent", test instanceof TestPersistent);
- }
-
- public void testGetOMInstanceObjectKey() throws TorqueException
- {
- TestPersistent test = manager.getOMInstance(TEST_PRIMARY_KEY);
- assertNotNull("Instance should not be null", test);
- assertTrue("Instance should be a TestPersistent", test instanceof TestPersistent);
- assertEquals("Instance should have id 'testID'", TEST_PRIMARY_KEY, test.getPrimaryKey());
- }
-
- public void testGetOMInstanceObjectKeyBoolean() throws TorqueException
- {
- TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, false);
- TestPersistent test2 = manager.getOMInstance(TEST_PRIMARY_KEY, false);
- assertNotSame("Should be different instances", test1, test2);
-
- TestPersistent test3 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
- TestPersistent test4 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
- assertSame("Should be same instances", test3, test4);
- }
-
- public void testCacheGet() throws TorqueException
- {
- TestPersistent test1 = manager.cacheGet(TEST_PRIMARY_KEY);
- assertNull("Should not be in cache", test1);
- test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
- TestPersistent test2 = manager.cacheGet(TEST_PRIMARY_KEY);
- assertSame("Should be same instances", test1, test2);
- }
-
- public void testClearImpl() throws TorqueException
- {
- TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
- TestPersistent test2 = manager.cacheGet(TEST_PRIMARY_KEY);
- assertNotNull("Should be in cache", test2);
- assertSame("Should be same instances", test1, test2);
- manager.clearImpl();
- TestPersistent test3 = manager.cacheGet(TEST_PRIMARY_KEY);
- assertNull("Should not be in cache", test3);
- }
-
- public void testRemoveInstanceImpl() throws TorqueException
- {
- TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
- TestPersistent test2 = manager.removeInstanceImpl(TEST_PRIMARY_KEY);
- assertSame("Should be same instances", test1, test2);
- TestPersistent test3 = manager.cacheGet(TEST_PRIMARY_KEY);
- assertNull("Should not be in cache", test3);
- }
-
- public void testPutInstanceImplSerializableT() throws TorqueException
- {
- TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
- TestPersistent test2 = manager.getOMInstance(TEST_PRIMARY_KEY, false);
- TestPersistent test3 = manager.putInstanceImpl(TEST_PRIMARY_KEY, test2);
- assertSame("Should be same instances", test1, test3);
- TestPersistent test4 = manager.cacheGet(TEST_PRIMARY_KEY);
- assertSame("Should be same instances", test2, test4);
- }
-
- public void testGetMethodResultCache()
- {
- MethodResultCache mrc = manager.getMethodResultCache();
- assertNotNull("Should have MethodResultCache", mrc);
- }
-
- public void testListeners()
- {
- manager.addValidField(new ColumnImpl("test1"), new ColumnImpl("test2"));
- manager.addCacheListenerImpl(this);
- this.addedObjectCalled = false;
- this.refreshedObjectCalled = false;
+    {
+        List<Column> columnList = new ArrayList<>(2);
+        columnList.add(new ColumnImpl("test1"));
+        columnList.add(new ColumnImpl("test2"));
+        return columnList;
+    }
+
+    /**
+     * @see junit.framework.TestCase#setUp()
+     */
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+
+        this.manager = new TestManager();
+        this.manager.setOMClass(TestPersistent.class);
+        this.manager.setRegion(CACHE_REGION);
+    }
+
+    /**
+     * @see junit.framework.TestCase#tearDown()
+     */
+    @Override
+    protected void tearDown() throws Exception
+    {
+        manager.cache.clear();
+        super.tearDown();
+    }
+
+    public void testGetOMInstance() throws TorqueException
+    {
+        TestPersistent test = manager.getOMInstance();
+        assertNotNull("Instance should not be null", test);
+        assertTrue("Instance should be a TestPersistent", test instanceof TestPersistent);
+    }
+
+    public void testGetOMInstanceObjectKey() throws TorqueException
+    {
+        TestPersistent test = manager.getOMInstance(TEST_PRIMARY_KEY);
+        assertNotNull("Instance should not be null", test);
+        assertTrue("Instance should be a TestPersistent", test instanceof TestPersistent);
+        assertEquals("Instance should have id 'testID'", TEST_PRIMARY_KEY, test.getPrimaryKey());
+    }
+
+    public void testGetOMInstanceObjectKeyBoolean() throws TorqueException
+    {
+        TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, false);
+        TestPersistent test2 = manager.getOMInstance(TEST_PRIMARY_KEY, false);
+        assertNotSame("Should be different instances", test1, test2);
+
+        TestPersistent test3 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
+        TestPersistent test4 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
+        assertSame("Should be same instances", test3, test4);
+    }
+
+    public void testCacheGet() throws TorqueException
+    {
+        TestPersistent test1 = manager.cacheGet(TEST_PRIMARY_KEY);
+        assertNull("Should not be in cache", test1);
+        test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
+        TestPersistent test2 = manager.cacheGet(TEST_PRIMARY_KEY);
+        assertSame("Should be same instances", test1, test2);
+    }
+
+    public void testClearImpl() throws TorqueException
+    {
+        TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
+        TestPersistent test2 = manager.cacheGet(TEST_PRIMARY_KEY);
+        assertNotNull("Should be in cache", test2);
+        assertSame("Should be same instances", test1, test2);
+        manager.clearImpl();
+        TestPersistent test3 = manager.cacheGet(TEST_PRIMARY_KEY);
+        assertNull("Should not be in cache", test3);
+    }
+
+    public void testRemoveInstanceImpl() throws TorqueException
+    {
+        TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
+        TestPersistent test2 = manager.removeInstanceImpl(TEST_PRIMARY_KEY);
+        assertSame("Should be same instances", test1, test2);
+        TestPersistent test3 = manager.cacheGet(TEST_PRIMARY_KEY);
+        assertNull("Should not be in cache", test3);
+    }
+
+    public void testPutInstanceImplSerializableT() throws TorqueException
+    {
+        TestPersistent test1 = manager.getOMInstance(TEST_PRIMARY_KEY, true);
+        TestPersistent test2 = manager.getOMInstance(TEST_PRIMARY_KEY, false);
+        TestPersistent test3 = manager.putInstanceImpl(TEST_PRIMARY_KEY, test2);
+        assertSame("Should be same instances", test1, test3);
+        TestPersistent test4 = manager.cacheGet(TEST_PRIMARY_KEY);
+        assertSame("Should be same instances", test2, test4);
+    }
+
+    public void testGetMethodResultCache()
+    {
+        MethodResultCache mrc = manager.getMethodResultCache();
+        assertNotNull("Should have MethodResultCache", mrc);
+    }
+
+    public void testListeners()
+    {
+        manager.addValidField(new ColumnImpl("test1"), new ColumnImpl("test2"));
+        manager.addCacheListenerImpl(this);
+        this.addedObjectCalled = false;
+        this.refreshedObjectCalled = false;
         this.removedObjectCalled = false;
- TestPersistent test1 = new TestPersistent();
- TestPersistent test2 = new TestPersistent();
- manager.notifyListeners(new ColumnImpl("test1"), (TestPersistent)null, test1);
- assertTrue("Should call addedObject", addedObjectCalled);
- assertFalse("Should not call refreshedObject", refreshedObjectCalled);
+        TestPersistent test1 = new TestPersistent();
+        TestPersistent test2 = new TestPersistent();
+        manager.notifyListeners(new ColumnImpl("test1"), (TestPersistent)null, test1);
+        assertTrue("Should call addedObject", addedObjectCalled);
+        assertFalse("Should not call refreshedObject", refreshedObjectCalled);
         assertFalse("Should not call removedObject", removedObjectCalled);
 
- this.addedObjectCalled = false;
- this.refreshedObjectCalled = false;
+        this.addedObjectCalled = false;
+        this.refreshedObjectCalled = false;
         this.removedObjectCalled = false;
- manager.notifyListeners(new ColumnImpl("test2"), test2, test1);
- assertFalse("Should not call addedObject", addedObjectCalled);
- assertTrue("Should call refreshedObject", refreshedObjectCalled);
+        manager.notifyListeners(new ColumnImpl("test2"), test2, test1);
+        assertFalse("Should not call addedObject", addedObjectCalled);
+        assertTrue("Should call refreshedObject", refreshedObjectCalled);
         assertFalse("Should not call removedObject", removedObjectCalled);
 
         this.addedObjectCalled = false;
@@ -207,5 +207,5 @@ public class AbstractBaseManagerTest ext
         assertFalse("Should not call addedObject", addedObjectCalled);
         assertFalse("Should not call refreshedObject", refreshedObjectCalled);
         assertTrue("Should call removedObject", removedObjectCalled);
- }
+    }
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/MethodResultCacheTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/MethodResultCacheTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/MethodResultCacheTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/MethodResultCacheTest.java Mon Aug 27 09:48:33 2018
@@ -27,96 +27,96 @@ import org.apache.torque.TorqueException
 
 public class MethodResultCacheTest extends TestCase
 {
- private static final String CACHE_REGION = "testCache1";
- private static final String TEST_METHOD1 = "testMethod1";
- private static final String TEST_METHOD2 = "testMethod2";
- private static final String TEST_ARG_ONE = "one";
- private static final String TEST_ARG_TWO = "two";
- private static final String TEST_ARG_THREE = "three";
+    private static final String CACHE_REGION = "testCache1";
+    private static final String TEST_METHOD1 = "testMethod1";
+    private static final String TEST_METHOD2 = "testMethod2";
+    private static final String TEST_ARG_ONE = "one";
+    private static final String TEST_ARG_TWO = "two";
+    private static final String TEST_ARG_THREE = "three";
 
- private TestManager manager;
- private MethodResultCache mrc;
+    private TestManager manager;
+    private MethodResultCache mrc;
 
- static
- {
+    static
+    {
         try
         {
- org.apache.torque.Torque.init(BaseTestCase.CONFIG_FILE);
- org.apache.torque.Torque.getConfiguration().setProperty(Torque.CACHE_KEY, Boolean.TRUE);
- }
+            org.apache.torque.Torque.init(BaseTestCase.CONFIG_FILE);
+            org.apache.torque.Torque.getConfiguration().setProperty(Torque.CACHE_KEY, Boolean.TRUE);
+        }
         catch (TorqueException e)
         {
- e.printStackTrace();
- }
- }
-
- /**
- * @see junit.framework.TestCase#setUp()
- */
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- this.manager = new TestManager();
- this.manager.setOMClass(TestPersistent.class);
- this.manager.setRegion(CACHE_REGION);
- this.mrc = this.manager.getMethodResultCache();
- }
-
- /**
- * @see junit.framework.TestCase#tearDown()
- */
- @Override
- protected void tearDown() throws Exception
- {
- mrc.clear();
- super.tearDown();
- }
-
- public void testGetAndPut()
- {
- TestPersistent test1 = new TestPersistent();
- mrc.put(test1, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
- TestPersistent test2 = mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
- assertNotNull("Should be in cache", test2);
- assertSame("Should be same instance", test1, test2);
- }
-
- public void testRemoveAll()
- {
- TestPersistent test1 = new TestPersistent();
- mrc.put(test1, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
- assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
- TestPersistent test2 = new TestPersistent();
- mrc.put(test2, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_THREE);
- assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_THREE));
-
- TestPersistent test3 = new TestPersistent();
- mrc.put(test3, TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_TWO);
- assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_TWO));
- TestPersistent test4 = new TestPersistent();
- mrc.put(test4, TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_THREE);
- assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_THREE));
-
- mrc.removeAll(TestPersistent.class, TEST_METHOD1);
-
- assertNull("Should not be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
- assertNull("Should not be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_THREE));
-
- assertNotNull("Should still be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_TWO));
- assertNotNull("Should still be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_THREE));
- }
-
- public void testRemove()
- {
- TestPersistent test1 = new TestPersistent();
- mrc.put(test1, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
- assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
-
- TestPersistent test3 = mrc.remove(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
-
- assertNull("Should not be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
- assertSame("Should be same instance", test1, test3);
- }
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * @see junit.framework.TestCase#setUp()
+     */
+    @Override
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+
+        this.manager = new TestManager();
+        this.manager.setOMClass(TestPersistent.class);
+        this.manager.setRegion(CACHE_REGION);
+        this.mrc = this.manager.getMethodResultCache();
+    }
+
+    /**
+     * @see junit.framework.TestCase#tearDown()
+     */
+    @Override
+    protected void tearDown() throws Exception
+    {
+        mrc.clear();
+        super.tearDown();
+    }
+
+    public void testGetAndPut()
+    {
+        TestPersistent test1 = new TestPersistent();
+        mrc.put(test1, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
+        TestPersistent test2 = mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
+        assertNotNull("Should be in cache", test2);
+        assertSame("Should be same instance", test1, test2);
+    }
+
+    public void testRemoveAll()
+    {
+        TestPersistent test1 = new TestPersistent();
+        mrc.put(test1, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
+        assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
+        TestPersistent test2 = new TestPersistent();
+        mrc.put(test2, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_THREE);
+        assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_THREE));
+
+        TestPersistent test3 = new TestPersistent();
+        mrc.put(test3, TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_TWO);
+        assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_TWO));
+        TestPersistent test4 = new TestPersistent();
+        mrc.put(test4, TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_THREE);
+        assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_THREE));
+
+        mrc.removeAll(TestPersistent.class, TEST_METHOD1);
+
+        assertNull("Should not be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
+        assertNull("Should not be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_THREE));
+
+        assertNotNull("Should still be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_TWO));
+        assertNotNull("Should still be in cache", mrc.get(TestPersistent.class, TEST_METHOD2, TEST_ARG_ONE, TEST_ARG_THREE));
+    }
+
+    public void testRemove()
+    {
+        TestPersistent test1 = new TestPersistent();
+        mrc.put(test1, TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
+        assertNotNull("Should be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
+
+        TestPersistent test3 = mrc.remove(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO);
+
+        assertNull("Should not be in cache", mrc.get(TestPersistent.class, TEST_METHOD1, TEST_ARG_ONE, TEST_ARG_TWO));
+        assertSame("Should be same instance", test1, test3);
+    }
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestManager.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestManager.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestManager.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestManager.java Mon Aug 27 09:48:33 2018
@@ -31,29 +31,29 @@ import org.apache.torque.om.ObjectKey;
  */
 public class TestManager extends AbstractBaseManager<TestPersistent>
 {
- /** Serial number */
- private static final long serialVersionUID = 1021912588603493352L;
+    /** Serial number */
+    private static final long serialVersionUID = 1021912588603493352L;
 
- @Override
- protected TestPersistent retrieveStoredOM(ObjectKey id)
- throws TorqueException
- {
- TestPersistent test = new TestPersistent();
- test.setPrimaryKey(id);
- return test;
- }
+    @Override
+    protected TestPersistent retrieveStoredOM(ObjectKey id)
+            throws TorqueException
+    {
+        TestPersistent test = new TestPersistent();
+        test.setPrimaryKey(id);
+        return test;
+    }
 
- @Override
- protected List<TestPersistent> retrieveStoredOMs(
- List<? extends ObjectKey> ids) throws TorqueException
- {
- List<TestPersistent> testList = new ArrayList<TestPersistent>(ids.size());
+    @Override
+    protected List<TestPersistent> retrieveStoredOMs(
+            List<? extends ObjectKey> ids) throws TorqueException
+    {
+        List<TestPersistent> testList = new ArrayList<>(ids.size());
 
- for (ObjectKey id : ids)
- {
- testList.add(retrieveStoredOM(id));
- }
+        for (ObjectKey id : ids)
+        {
+            testList.add(retrieveStoredOM(id));
+        }
 
- return testList;
- }
+        return testList;
+    }
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestPersistent.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestPersistent.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestPersistent.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/manager/TestPersistent.java Mon Aug 27 09:48:33 2018
@@ -33,96 +33,106 @@ import org.apache.torque.om.SimpleKey;
  */
 public class TestPersistent implements Persistent, Serializable
 {
- /** Serial ID  */
- private static final long serialVersionUID = 738162496580951932L;
+    /** Serial ID  */
+    private static final long serialVersionUID = 738162496580951932L;
 
- private ObjectKey primaryKey;
- private boolean isNew = true;
- private boolean modified;
-
- /**
- * @see org.apache.torque.om.Persistent#getPrimaryKey()
- */
- public ObjectKey getPrimaryKey()
- {
- return primaryKey;
- }
-
- /**
- * @see org.apache.torque.om.Persistent#setPrimaryKey(org.apache.torque.om.ObjectKey)
- */
- public void setPrimaryKey(ObjectKey primaryKey) throws TorqueException
- {
- this.primaryKey = primaryKey;
- }
-
- /**
- * @see org.apache.torque.om.Persistent#setPrimaryKey(java.lang.String)
- */
- public void setPrimaryKey(String primaryKey) throws TorqueException
- {
- setPrimaryKey(SimpleKey.keyFor(primaryKey));
- }
-
- /**
- * @see org.apache.torque.om.Persistent#isModified()
- */
- public boolean isModified()
- {
- return modified;
- }
-
- /**
- * @see org.apache.torque.om.Persistent#isNew()
- */
- public boolean isNew()
- {
- return isNew;
- }
-
- /**
- * @see org.apache.torque.om.Persistent#setNew(boolean)
- */
- public void setNew(boolean b)
- {
- this.isNew = b;
- }
-
- /**
- * @see org.apache.torque.om.Persistent#setModified(boolean)
- */
- public void setModified(boolean m)
- {
- this.modified = m;
- }
-
- /**
- * @see org.apache.torque.om.Persistent#save()
- */
- public void save() throws Exception
- {
- // do nothing
- setModified(false);
- setNew(false);
- }
-
- /**
- * @see org.apache.torque.om.Persistent#save(java.lang.String)
- */
- public void save(String dbName) throws Exception
- {
- // do nothing
- setModified(false);
- setNew(false);
- }
-
- /**
- * @see org.apache.torque.om.Persistent#save(java.sql.Connection)
- */
- public void save(Connection con) throws Exception
- {
- // do nothing
- setModified(false);
- setNew(false);
- }
+    private ObjectKey primaryKey;
+    private boolean isNew = true;
+    private boolean modified;
+
+    /**
+     * @see org.apache.torque.om.Persistent#getPrimaryKey()
+     */
+    @Override
+    public ObjectKey getPrimaryKey()
+    {
+        return primaryKey;
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#setPrimaryKey(org.apache.torque.om.ObjectKey)
+     */
+    @Override
+    public void setPrimaryKey(ObjectKey primaryKey) throws TorqueException
+    {
+        this.primaryKey = primaryKey;
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#setPrimaryKey(java.lang.String)
+     */
+    @Override
+    public void setPrimaryKey(String primaryKey) throws TorqueException
+    {
+        setPrimaryKey(SimpleKey.keyFor(primaryKey));
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#isModified()
+     */
+    @Override
+    public boolean isModified()
+    {
+        return modified;
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#isNew()
+     */
+    @Override
+    public boolean isNew()
+    {
+        return isNew;
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#setNew(boolean)
+     */
+    @Override
+    public void setNew(boolean b)
+    {
+        this.isNew = b;
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#setModified(boolean)
+     */
+    @Override
+    public void setModified(boolean m)
+    {
+        this.modified = m;
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#save()
+     */
+    @Override
+    public void save() throws Exception
+    {
+        // do nothing
+        setModified(false);
+        setNew(false);
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#save(java.lang.String)
+     */
+    @Override
+    public void save(String dbName) throws Exception
+    {
+        // do nothing
+        setModified(false);
+        setNew(false);
+    }
+
+    /**
+     * @see org.apache.torque.om.Persistent#save(java.sql.Connection)
+     */
+    @Override
+    public void save(Connection con) throws Exception
+    {
+        // do nothing
+        setModified(false);
+        setNew(false);
+    }
 }

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/ComboKeyTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/ComboKeyTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/ComboKeyTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/ComboKeyTest.java Mon Aug 27 09:48:33 2018
@@ -33,17 +33,17 @@ import junit.framework.TestSuite;
 public class ComboKeyTest extends TestCase
 {
     private ComboKey c1a = new ComboKey(
-        new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
+            new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
     private ComboKey c1b = new ComboKey(
-        new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
+            new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
     private ComboKey c2a = new ComboKey(
-        new SimpleKey[]{new StringKey("key3"), new StringKey("key4")});
+            new SimpleKey[]{new StringKey("key3"), new StringKey("key4")});
     // complex keys for test
     private java.util.Date now = new java.util.Date();
     private ComboKey c3a = new ComboKey(
-        new SimpleKey[]{new StringKey("key1"), null, new DateKey(now)});
+            new SimpleKey[]{new StringKey("key1"), null, new DateKey(now)});
     private ComboKey c4a = new ComboKey(
-        new SimpleKey[]{new StringKey("key1"), null, new NumberKey(123456)});
+            new SimpleKey[]{new StringKey("key1"), null, new NumberKey(123456)});
 
     /**
      * Simple constructor.
@@ -55,19 +55,19 @@ public class ComboKeyTest extends TestCa
         super(name);
     }
 
-        /**
-         *
-         * @param args
-         */
+    /**
+     *
+     * @param args
+     */
     public static void main(java.lang.String[] args)
     {
         junit.textui.TestRunner.run(suite());
     }
 
-        /**
-         *
-         * @return Test
-         */
+    /**
+     *
+     * @return Test
+     */
     public static Test suite()
     {
         TestSuite suite = new TestSuite(ComboKeyTest.class);
@@ -75,10 +75,10 @@ public class ComboKeyTest extends TestCa
         return suite;
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testReflexive()
     {
         Assert.assertTrue(c1a.equals(c1a));
@@ -88,43 +88,43 @@ public class ComboKeyTest extends TestCa
         Assert.assertTrue(c3a.looseEquals(c3a));
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testSymmetric()
     {
         Assert.assertTrue(c1a.equals(c1b));
         Assert.assertTrue(c1b.equals(c1a));
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testNull()
     {
         Assert.assertTrue(!c1a.equals(null));
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testNotEqual()
     {
         Assert.assertTrue(!c1a.equals(c2a));
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testRoundTripWithStringKeys()
     {
         // two strings
         ComboKey oldKey = new ComboKey(
-            new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
+                new SimpleKey[]{new StringKey("key1"), new StringKey("key2")});
         ComboKey newKey = null;
         String stringValue = oldKey.toString();
         try
@@ -134,22 +134,22 @@ public class ComboKeyTest extends TestCa
         catch(Exception e)
         {
             fail("Exception " + e.getClass().getName()
-                     + " thrown on new ComboKey(" + stringValue + "):"
-                     + e.getMessage());
+                    + " thrown on new ComboKey(" + stringValue + "):"
+                    + e.getMessage());
         }
         Assert.assertEquals(oldKey,newKey);
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testRoundTripWithComplexKey()
     {
         // complex key
         ComboKey oldKey = new ComboKey(
-            new SimpleKey[]{new StringKey("key1"), new NumberKey(12345),
-            new DateKey(new java.util.Date())});
+                new SimpleKey[]{new StringKey("key1"), new NumberKey(12345),
+                        new DateKey(new java.util.Date())});
         ComboKey newKey = null;
         String stringValue = oldKey.toString();
         try
@@ -165,15 +165,15 @@ public class ComboKeyTest extends TestCa
         Assert.assertEquals(oldKey,newKey);
     }
 
-        /**
-         *
-         *
-         */
+    /**
+     *
+     *
+     */
     public void testRoundTripWithNullKey()
     {
         // with null key
         ComboKey oldKey = new ComboKey(
-            new SimpleKey[]{new StringKey("key1"), null});
+                new SimpleKey[]{new StringKey("key1"), null});
         ComboKey newKey = null;
         String stringValue = oldKey.toString();
         try

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/CompositeMapperTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/CompositeMapperTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/CompositeMapperTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/CompositeMapperTest.java Mon Aug 27 09:48:33 2018
@@ -62,11 +62,11 @@ public class CompositeMapperTest extends
         super.setUp();
         MockitoAnnotations.initMocks(this);
         when(recordMapper1.processRow(resultSet,3, criteria))
-            .thenReturn(null);
+        .thenReturn(null);
         when(recordMapper2.processRow(resultSet, 4, criteria))
-            .thenReturn(Integer.valueOf(1));
+        .thenReturn(Integer.valueOf(1));
         when(recordMapper3.processRow(resultSet, 5, criteria))
-            .thenReturn(new Long(2));
+        .thenReturn(new Long(2));
 
         mapper = new CompositeMapper();
         mapper.addMapper(recordMapper1, 1);
@@ -104,7 +104,7 @@ public class CompositeMapperTest extends
     {
         // prepare
         when(recordMapper1.processRow(resultSet, 1, criteria))
-            .thenThrow(new TorqueException("thrown by mock"));
+        .thenThrow(new TorqueException("thrown by mock"));
 
         // execute
         try

Modified: db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/ObjectListMapperTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/ObjectListMapperTest.java?rev=1839288&r1=1839287&r2=1839288&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/ObjectListMapperTest.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/test/java/org/apache/torque/om/mapper/ObjectListMapperTest.java Mon Aug 27 09:48:33 2018
@@ -204,7 +204,7 @@ public class ObjectListMapperTest extend
     public void testProcessRowClassListAsArgument() throws Exception
     {
         // prepare
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(BigDecimal.class);
         classList.add(Array.class);
         classList.add(BigDecimal.class);
@@ -319,7 +319,7 @@ public class ObjectListMapperTest extend
     public void testUnknownClass() throws Exception
     {
         // prepare
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(RecordMapper.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 
@@ -334,8 +334,8 @@ public class ObjectListMapperTest extend
         {
             // verify 2
             assertEquals("Unknown convertClass "
-              + "org.apache.torque.om.mapper.RecordMapper at position 0",
-              e.getMessage());
+                    + "org.apache.torque.om.mapper.RecordMapper at position 0",
+                    e.getMessage());
             verifyNoMoreInteractions(resultSet);
         }
     }
@@ -346,7 +346,7 @@ public class ObjectListMapperTest extend
         byte zero = 0;
         when(resultSet.getByte(1)).thenReturn(zero);
         when(resultSet.wasNull()).thenReturn(true);
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(Byte.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 
@@ -367,7 +367,7 @@ public class ObjectListMapperTest extend
         short zero = 0;
         when(resultSet.getShort(1)).thenReturn(zero);
         when(resultSet.wasNull()).thenReturn(true);
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(Short.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 
@@ -387,7 +387,7 @@ public class ObjectListMapperTest extend
         // prepare
         when(resultSet.getInt(1)).thenReturn(0);
         when(resultSet.wasNull()).thenReturn(true);
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(Integer.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 
@@ -407,7 +407,7 @@ public class ObjectListMapperTest extend
         // prepare
         when(resultSet.getLong(1)).thenReturn(0L);
         when(resultSet.wasNull()).thenReturn(true);
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(Long.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 
@@ -427,7 +427,7 @@ public class ObjectListMapperTest extend
         // prepare
         when(resultSet.getDouble(1)).thenReturn(0d);
         when(resultSet.wasNull()).thenReturn(true);
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(Double.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 
@@ -447,7 +447,7 @@ public class ObjectListMapperTest extend
         // prepare
         when(resultSet.getFloat(1)).thenReturn(0f);
         when(resultSet.wasNull()).thenReturn(true);
-        List<Class<?>> classList = new ArrayList<Class<?>>();
+        List<Class<?>> classList = new ArrayList<>();
         classList.add(Float.class);
         ObjectListMapper mapper = new ObjectListMapper(classList);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]