You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2013/05/15 14:11:02 UTC

svn commit: r1482780 - in /db/derby/code/trunk/java/testing/org/apache: derby/ derbyTesting/functionTests/testData/ derbyTesting/functionTests/tests/derbynet/ derbyTesting/junit/ derbyTesting/perf/ derbyTesting/perf/clients/ derbyTesting/system/mailjdb...

Author: kahatlen
Date: Wed May 15 12:11:01 2013
New Revision: 1482780

URL: http://svn.apache.org/r1482780
Log:
DERBY-5840: Clean up compiler warnings introduced by using Java 5 language features

Clean up warnings in various test packages:

  - derbynet
  - perf
  - system

Modified:
    db/derby/code/trunk/java/testing/org/apache/derby/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ByteArrayCombinerStreamTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ClientSideSystemPropertiesTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SSLTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/Runner.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/SequenceGeneratorConcurrency.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/ThreadUtils.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/Standard.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/StatementHelper.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/test/OperationsTester.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/build.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/GenericQuery.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/QueryList.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/utils/TestViews.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/build.xml

Modified: db/derby/code/trunk/java/testing/org/apache/derby/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derby/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derby/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derby/build.xml Wed May 15 12:11:01 2013
@@ -51,6 +51,7 @@
                  won't check the timestamp on the other Java files to determine
                  if they have been changed since last compile then. -->
             <include name="org/apache/derby/**/*java"/>
+            <compilerarg value="-Xlint"/>
         </javac>
     </target>
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/testData/build.xml Wed May 15 12:11:01 2013
@@ -79,6 +79,7 @@
         <pathelement path="${compile.classpath}"/>
       </classpath>
       <include name="${derby.testing.functest.dir}/testData/serializedDataSources/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ByteArrayCombinerStreamTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ByteArrayCombinerStreamTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ByteArrayCombinerStreamTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ByteArrayCombinerStreamTest.java Wed May 15 12:11:01 2013
@@ -68,7 +68,7 @@ public class ByteArrayCombinerStreamTest
     public void testCombineAvailable4bytes()
             throws IOException {
         byte[] array = {65,66,77,79};
-        ArrayList list = new ArrayList(1);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(1);
         list.add(array);
         combiner = new ByteArrayCombinerStream(list, 4);
         assertEquals(4, combiner.available());
@@ -85,7 +85,7 @@ public class ByteArrayCombinerStreamTest
     public void testCombineWithExtraEmptyByteArray()
             throws IOException {
         byte[] array = {65,66,77,79};
-        ArrayList list = new ArrayList(2);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(2);
         list.add(array);
         list.add(new byte[4]);
         combiner = new ByteArrayCombinerStream(list, array.length);
@@ -97,7 +97,7 @@ public class ByteArrayCombinerStreamTest
 
     public void testCombineOneArray()
             throws IOException {
-        ArrayList list = new ArrayList(1);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(1);
         list.add(defaultArray);
         combiner = new ByteArrayCombinerStream(list, defaultArray.length);
         byte[] resArray = new byte[defaultArray.length];
@@ -111,7 +111,7 @@ public class ByteArrayCombinerStreamTest
             throws IOException {
         int arrays = 100;
         byte[] array = {65,66,77,79};
-        ArrayList list = new ArrayList(arrays);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(arrays);
         long length = 0;
         for (int i=0; i < arrays; i++) {
             list.add(array);
@@ -134,7 +134,7 @@ public class ByteArrayCombinerStreamTest
     public void testTruncateDataFromOneArray()
             throws IOException {
         int length = defaultArray.length -5;
-        ArrayList list = new ArrayList(1);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(1);
         list.add(defaultArray);
         byte[] targetArray = new byte[length];
         System.arraycopy(defaultArray, 0,
@@ -149,7 +149,7 @@ public class ByteArrayCombinerStreamTest
     public void testTruncateDataFromTwoArrays()
             throws IOException {
         int length = (defaultArray.length *2) -7;
-        ArrayList list = new ArrayList(2);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(2);
         list.add(defaultArray);
         list.add(defaultArray);
         byte[] targetArray = new byte[length];
@@ -170,7 +170,7 @@ public class ByteArrayCombinerStreamTest
      * the specified length.
      */
     public void testTooLittleDataNoCombine() {
-        ArrayList list = new ArrayList(1);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(1);
         list.add(new byte[5]);
         try {
             combiner = new ByteArrayCombinerStream(list, 10);
@@ -186,7 +186,7 @@ public class ByteArrayCombinerStreamTest
      * the specified length.
      */
     public void testTooLittleDataWithCombine() {
-        ArrayList list = new ArrayList(3);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(3);
         byte[] data = {65,66,67,68,69};
         list.add(data);
         list.add(data);
@@ -204,7 +204,7 @@ public class ByteArrayCombinerStreamTest
      * Make sure an exception is thrown if a negative length is specified.
      */
     public void testNegativeLengthArgument() {
-        ArrayList list = new ArrayList(1);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(1);
         list.add(new byte[1234]);
         try {
             combiner = new ByteArrayCombinerStream(list, -54);
@@ -227,7 +227,7 @@ public class ByteArrayCombinerStreamTest
         byte[] data = {66,67,-123,68,69};
         byte[] targetData = {66,67,0,0,0};
         byte[] resData = new byte[5];
-        ArrayList list = new ArrayList(1);
+        ArrayList<byte[]> list = new ArrayList<byte[]>(1);
         list.add(data);
         combiner = new ByteArrayCombinerStream(list, data.length);
         byte b;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ClientSideSystemPropertiesTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ClientSideSystemPropertiesTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ClientSideSystemPropertiesTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ClientSideSystemPropertiesTest.java Wed May 15 12:11:01 2013
@@ -26,7 +26,6 @@ import java.security.AccessController;
 import java.util.Properties;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.SystemPropertyTestSetup;
@@ -44,8 +43,8 @@ public class ClientSideSystemPropertiesT
         //made in the privilege block below by looking inside the 
         //trace Directory and making sure the file count is greater than 0.
         AccessController.doPrivileged
-		    (new java.security.PrivilegedAction(){
-		    	public Object run(){
+		    (new java.security.PrivilegedAction<Void>(){
+		    	public Void run(){
 		    		File dir = new File(getSystemProperty("derby.client.traceDirectory"));
 		    		int fileCounter = 0;
     	            File[] list = dir.listFiles();
@@ -64,8 +63,8 @@ public class ClientSideSystemPropertiesT
     protected void setUp() throws Exception
     {
     	AccessController.doPrivileged(
-    			new java.security.PrivilegedAction(){
-    				public Object run(){
+    			new java.security.PrivilegedAction<Void>(){
+    				public Void run(){
     					File dir = new File(getSystemProperty("derby.client.traceDirectory"));
     					if (dir.exists() == false) //create the trace Directory
     						junit.framework.Assert.assertTrue(dir.mkdir() || dir.mkdirs());

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/DerbyNetAutoStartTest.java Wed May 15 12:11:01 2013
@@ -42,6 +42,7 @@ import org.apache.derby.drda.NetworkServ
 import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.Derby;
+import org.apache.derbyTesting.junit.LocaleTestSetup;
 import org.apache.derbyTesting.junit.NetworkServerTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
 
@@ -155,8 +156,8 @@ public class DerbyNetAutoStartTest exten
         final PrintStream realSystemErr = System.err;
         ByteArrayOutputStream serverOutputBOS = new ByteArrayOutputStream();
         final PrintStream serverOutputOut = new PrintStream( serverOutputBOS);
-        AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            public Void run() {
                 System.setOut(new PrintStream(serverOutputOut));
                 System.setErr(new PrintStream(serverOutputOut));
                 return null;
@@ -178,8 +179,8 @@ public class DerbyNetAutoStartTest exten
             }
         } finally {
             // Restore the original out streams
-            AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                public Void run() {
                     System.setOut(realSystemOut);
                     System.setErr(realSystemErr);
                     return null;
@@ -238,16 +239,8 @@ public class DerbyNetAutoStartTest exten
      */
     public void testStartNetworkServerLogMessageOnDualStart()
             throws Exception {
-        final Locale newLocale = Locale.ENGLISH;
         // first force English locale
-        AccessController.doPrivileged
-        (new java.security.PrivilegedAction() {
-            public Object run() {
-                Locale.setDefault(newLocale);
-                return null;
-            }
-        }
-        );
+        LocaleTestSetup.setDefaultLocale(Locale.ENGLISH);
         int doubleport = TestConfiguration.getCurrent().getPort();
         // start a network server
         NetworkServerControl ns = 
@@ -359,14 +352,7 @@ public class DerbyNetAutoStartTest exten
         removeSystemProperty("derby.drda.startNetworkServer");
         removeSystemProperty("derby.drda.portNumber");
         // set the old locale back to the original
-        AccessController.doPrivileged
-        (new java.security.PrivilegedAction() {
-            public Object run() {
-                Locale.setDefault(oldLocale);
-                return null;
-            }
-        }
-        );
+        LocaleTestSetup.setDefaultLocale(oldLocale);
         oldLocale=null;
         super.tearDown();
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java Wed May 15 12:11:01 2013
@@ -23,7 +23,6 @@
 package org.apache.derbyTesting.functionTests.tests.derbynet;
 
 import java.util.HashMap;
-import java.util.Iterator;
 
 import java.sql.Connection;
 import java.sql.ResultSet;
@@ -1171,14 +1170,7 @@ public class NSSecurityMechanismTest ext
 
     private javax.sql.DataSource getDS(String user, String password)
     {
-        return getDS(user,password,null);
-    }
-
-    private javax.sql.DataSource getDS(
-        String user, String password, HashMap attrs)
-    {
-        if (attrs == null)
-            attrs = new HashMap();
+        HashMap<String, Object> attrs = new HashMap<String, Object>();
         if (user != null)
             attrs.put("user", user);
         if (password != null)
@@ -1186,16 +1178,15 @@ public class NSSecurityMechanismTest ext
         attrs = addRequiredAttributes(attrs);
 
         DataSource ds = JDBCDataSource.getDataSource();
-        for (Iterator i = attrs.keySet().iterator(); i.hasNext(); )
-        {
-            String property = (String) i.next();
+        for (String property : attrs.keySet()) {
             Object value = attrs.get(property);
             JDBCDataSource.setBeanProperty(ds, property, value);
         }
         return ds;
     }
 
-    private HashMap addRequiredAttributes(HashMap attrs)
+    private HashMap<String, Object> addRequiredAttributes(
+            HashMap<String, Object> attrs)
     {
         String hostName = TestConfiguration.getCurrent().getHostName();
         int port = TestConfiguration.getCurrent().getPort();
@@ -1218,7 +1209,7 @@ public class NSSecurityMechanismTest ext
     private javax.sql.ConnectionPoolDataSource getCPDS(
         String user, String password)
     {
-        HashMap attrs = new HashMap();
+        HashMap<String, Object> attrs = new HashMap<String, Object>();
         if (user != null)
             attrs.put("user", user);
         if (password != null)
@@ -1227,9 +1218,7 @@ public class NSSecurityMechanismTest ext
         attrs = addRequiredAttributes(attrs);
         ConnectionPoolDataSource cpds = 
             J2EEDataSource.getConnectionPoolDataSource();
-        for (Iterator i = attrs.keySet().iterator(); i.hasNext(); )
-        {
-            String property = (String) i.next();
+        for (String property : attrs.keySet()) {
             Object value = attrs.get(property);
             JDBCDataSource.setBeanProperty(cpds, property, value);
         }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/RuntimeInfoTest.java Wed May 15 12:11:01 2013
@@ -246,9 +246,9 @@ public class RuntimeInfoTest extends Bas
         return new SecurityManagerSetup(test, POLICY_FILE_NAME);
     }
 	
-	private static final HashMap outputs;
+	private static final HashMap<Locale, HashMap<String, String>> outputs;
 	static {
-		HashMap englishOutputs = new HashMap();
+		HashMap<String, String> englishOutputs = new HashMap<String, String>();
 		englishOutputs.put("RuntimeInfoWithActiveConn",
 				"--- Derby Network Server Runtime Information ---\n" + 
 				"---------- Session Information ---------------\n" + 
@@ -277,7 +277,7 @@ public class RuntimeInfoTest extends Bas
 		englishOutputs.put("sedMemoryReplace", "Memory : #####");
 		englishOutputs.put("RuntimeInfoLocaleString", "\tStmt ID\t\tSQLText\n\t-------------\t-----------\n\n\n\nSession");
 		
-		HashMap germanOutputs = new HashMap();
+		HashMap<String, String> germanOutputs = new HashMap<String, String>();
 		germanOutputs.put("RuntimeInfoWithActiveConn",
 				"--- Laufzeitinformationen zu Derby Network Server ---\n" + 
 				"---------- Sessioninformationen ---------------\n" + 
@@ -306,7 +306,7 @@ public class RuntimeInfoTest extends Bas
 		germanOutputs.put("sedMemoryReplace", "Speicher gesamt: #####	Freier Speicher: #####");
 		germanOutputs.put("RuntimeInfoLocaleString", "\tAnwsg-ID\t\tSQL-Text\n\t-------------\t-----------\n\n\n\nSessionnummer");
 		
-		outputs = new HashMap();
+		outputs = new HashMap<Locale, HashMap<String, String>>();
 		outputs.put(englishLocale, englishOutputs);
 		outputs.put(germanLocale, germanOutputs);
 	}

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SSLTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SSLTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SSLTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SSLTest.java Wed May 15 12:11:01 2013
@@ -21,7 +21,6 @@
 
 package org.apache.derbyTesting.functionTests.tests.derbynet;
 
-import java.util.ArrayList;
 import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.DataSource;
@@ -123,12 +122,10 @@ public class SSLTest extends BaseJDBCTes
      */
     private static  String[]  getStartupProperties()
     {
-        ArrayList list = new ArrayList();
-        list.add("javax.net.ssl.keyStore=extinout/SSLTestServerKey.key");
-        list.add("javax.net.ssl.keyStorePassword=qwerty");
-        String[] result = new String[ list.size()];
-        list.toArray(result);
-        return result;
+        return new String[] {
+            "javax.net.ssl.keyStore=extinout/SSLTestServerKey.key",
+            "javax.net.ssl.keyStorePassword=qwerty",
+        };
     }
     
     // JUnit Tests

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SecureServerTest.java Wed May 15 12:11:01 2013
@@ -263,7 +263,7 @@ public class SecureServerTest extends Ba
      */
     private static  String[]    getStartupArgs( boolean setUnsecureOption, String wildCardHost )
     {
-        ArrayList       list = new ArrayList();
+        ArrayList<String> list = new ArrayList<String>();
 
         if ( setUnsecureOption )
         {
@@ -275,12 +275,8 @@ public class SecureServerTest extends Ba
             list.add( NetworkServerTestSetup.HOST_OPTION );
             list.add( wildCardHost );
         }
-        
-        String[]    result = new String[ list.size() ];
-
-        list.toArray( result );
 
-        return result;
+        return list.toArray(new String[list.size()]);
     }
     
     /**
@@ -290,7 +286,7 @@ public class SecureServerTest extends Ba
      */
     private static  String[]  getStartupProperties( boolean authenticationRequired, String customDerbyProperties )
     {
-        ArrayList       list = new ArrayList();
+        ArrayList<String> list = new ArrayList<String>();
 
         if ( authenticationRequired )
         {
@@ -304,11 +300,7 @@ public class SecureServerTest extends Ba
             list.add( "derby.system.home=extinout" );
         }
 
-        String[]    result = new String[ list.size() ];
-
-        list.toArray( result );
-
-        return result;
+        return list.toArray(new String[list.size()]);
     }
     
     ///////////////////////////////////////////////////////////////////////////////////
@@ -435,7 +427,7 @@ public class SecureServerTest extends Ba
 
     public String toString()
     {
-        StringBuffer    buffer = new StringBuffer();
+        StringBuilder    buffer = new StringBuilder();
 
         buffer.append( "SecureServerTest( " );
         buffer.append( "Opened = " ); buffer.append( _unsecureSet);
@@ -463,7 +455,7 @@ public class SecureServerTest extends Ba
     {
         String          portNumber = Integer.toString( getTestConfiguration().getPort() );
 
-        ArrayList cmdList = new ArrayList();
+        ArrayList<String> cmdList = new ArrayList<String>();
         cmdList.add("-Demma.verbosity.level=silent");
         cmdList.add("org.apache.derby.drda.NetworkServerControl");
         cmdList.add("-p");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ServerPropertiesTest.java Wed May 15 12:11:01 2013
@@ -32,6 +32,7 @@ import junit.framework.Test;
 import junit.framework.TestSuite;
 
 import org.apache.derby.drda.NetworkServerControl;
+import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.Derby;
 import org.apache.derbyTesting.junit.JDBC;
@@ -376,9 +377,9 @@ public class ServerPropertiesTest  exten
                 new Integer(firstAlternatePort).toString());
 
         final String derbyHome = getSystemProperty("derby.system.home");
-        Boolean b = (Boolean)AccessController.doPrivileged
-        (new java.security.PrivilegedAction(){
-            public Object run(){
+        boolean b = AccessController.doPrivileged
+        (new java.security.PrivilegedAction<Boolean>(){
+            public Boolean run(){
                 boolean fail = false;
                 try {
                     FileOutputStream propFile = 
@@ -388,10 +389,10 @@ public class ServerPropertiesTest  exten
                 } catch (IOException ioe) {
                     fail = true;
                 }
-                return new Boolean(fail);
+                return fail;
             }
         });
-        if (b.booleanValue())
+        if (b)
         {
             checkWhetherNeedToShutdown(new int[] {TestConfiguration.getCurrent().getPort()}, "failed to write derby.properties");
         }
@@ -461,15 +462,8 @@ public class ServerPropertiesTest  exten
         checkWhetherNeedToShutdown ( new int[] {basePort, firstAlternatePort},
             actionResult);
         // remove derby.properties
-        Boolean ret = (Boolean) AccessController.doPrivileged
-        (new java.security.PrivilegedAction() {
-            public Object run() {
-                return Boolean.valueOf((new File(
-                    derbyHome+File.separator + "derby.properties")).delete());
-            }
-        }
-        );
-        if (ret.booleanValue() == false) {
+        if (!PrivilegedFileOpsForTests.delete(
+                new File(derbyHome, "derby.properties"))) {
             checkWhetherNeedToShutdown ( new int[] {basePort, firstAlternatePort},
                 "unable to remove derby.properties");
         }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/ShutDownDBWhenNSShutsDownTest.java Wed May 15 12:11:01 2013
@@ -21,7 +21,6 @@
 package org.apache.derbyTesting.functionTests.tests.derbynet;
 
 import java.io.File;
-import java.security.AccessController;
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.sql.Statement;
@@ -30,6 +29,7 @@ import junit.framework.Test;
 import junit.framework.TestSuite;
 
 import org.apache.derby.drda.NetworkServerControl;
+import org.apache.derbyTesting.functionTests.util.PrivilegedFileOpsForTests;
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.NetworkServerTestSetup;
 import org.apache.derbyTesting.junit.TestConfiguration;
@@ -195,29 +195,19 @@ public class ShutDownDBWhenNSShutsDownTe
                 TestConfiguration.getCurrent().getDefaultDatabaseName() +
                 java.io.File.separator + "db.lck";
 
+        File lockFile = new File(fileName);
+
         boolean fileNotFound = false;
         int i = 0;
         do {
             Thread.sleep(500);
-            fileNotFound = !fileExists(fileName);
+            fileNotFound = !PrivilegedFileOpsForTests.exists(lockFile);
             i ++;
         } while (fileNotFound != dbShutDown && i < 120);
 
         assertEquals("Database is shut down", dbShutDown, fileNotFound);
     }
 
-    private boolean fileExists (final String fileName) throws Exception {
-        Boolean b = (Boolean) AccessController.doPrivileged
-            (new java.security.PrivilegedAction(){
-                public Object run(){
-                    File file = new File(fileName);
-                    return new Boolean(file.exists());
-                }
-        });
-
-        return b.booleanValue();
-    }
-
     private void createDatabase() throws SQLException {
         Connection conn = getConnection();
         conn.setAutoCommit(false);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.java Wed May 15 12:11:01 2013
@@ -22,7 +22,6 @@
 package org.apache.derbyTesting.functionTests.tests.derbynet;
 
 import java.net.URL;
-import java.security.AccessController;
 import java.util.ArrayList;
 import java.util.Properties;
 
@@ -46,7 +45,7 @@ public class SysinfoTest extends BaseJDB
 
     private static final String POLICY_FILE_NAME=
         "org/apache/derbyTesting/functionTests/tests/derbynet/SysinfoTest.policy";
-    private ArrayList OUTPUT;
+    private ArrayList<String> OUTPUT;
 
     /**
      * Set to true before adding a test to the suite to add some extra properties.
@@ -63,7 +62,7 @@ public class SysinfoTest extends BaseJDB
         /**
          * Output from sysinfo without the extra properties. 
          */
-        ArrayList OUTPUT1 = new ArrayList();
+        ArrayList<String> OUTPUT1 = new ArrayList<String>();
         OUTPUT1.add("--------- Derby Network Server Information --------");
         OUTPUT1.add("derby.drda.maxThreads=0");
         OUTPUT1.add("derby.drda.sslMode=off"); 
@@ -82,7 +81,7 @@ public class SysinfoTest extends BaseJDB
         /**
          * Output by sysinfo with the extra properties.
          */
-        ArrayList OUTPUT2 = (ArrayList) OUTPUT1.clone();
+        ArrayList<String> OUTPUT2 = new ArrayList<String>(OUTPUT1);
         OUTPUT2.add("--------- Derby Network Server Information --------"); 
         OUTPUT2.add("derby.drda.securityMechanism=USER_ONLY_SECURITY"); 
 
@@ -223,20 +222,8 @@ public class SysinfoTest extends BaseJDB
     }
 
     private static String findClassDir() {
-        URL url = null;
-        try {
-            final Class cl = Class.forName("org.apache.derbyTesting." +
+        URL url = SecurityManagerSetup.getURL("org.apache.derbyTesting." +
                     "functionTests.tests.derbynet.SysinfoTest");
-        url = (URL)
-           AccessController.doPrivileged(new java.security.PrivilegedAction() {
-            public Object run() {
-                return cl.getProtectionDomain().getCodeSource().getLocation();
-            }
-        });
-        } catch (ClassNotFoundException e) {
-            // need catch to silence compiler, but as we're referring to *this*
-            // class, it ok to ignore this.
-        }
         return url.getPath();
     }
 
@@ -251,8 +238,7 @@ public class SysinfoTest extends BaseJDB
      * @param actualOutput Actual sysinfo output 
      */
     private void assertMatchingStringExists(String actualOutput) {
-        for (int i=0; i < OUTPUT.size(); i ++ ) {
-            String s = (String) OUTPUT.get(i);
+        for (String s : OUTPUT) {
             assertTrue("cannot find " + s + " in actualOutput:" + actualOutput,
                     actualOutput.indexOf(s) >=0);            
         }        

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml Wed May 15 12:11:01 2013
@@ -84,6 +84,7 @@
 	<pathelement path="${junit}"/>
       </classpath>
       <include name="${this.dir}/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/LocaleTestSetup.java Wed May 15 12:11:01 2013
@@ -54,7 +54,7 @@ public class LocaleTestSetup extends Tes
         setDefaultLocale(oldLocale);
 	}
 
-    private static void setDefaultLocale(final Locale locale) {
+    public static void setDefaultLocale(final Locale locale) {
         AccessController.doPrivileged(new PrivilegedAction<Void>() {
             public Void run() {
                 Locale.setDefault(locale);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/build.xml Wed May 15 12:11:01 2013
@@ -73,6 +73,7 @@
         <pathelement path="${junit}"/>
       </classpath>
       <include name="${derby.testing.perf.dir}/**/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
   </target>
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/Runner.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/Runner.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/Runner.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/Runner.java Wed May 15 12:11:01 2013
@@ -58,7 +58,8 @@ public class Runner {
     /** The name of the type of load to use in the test. */
     private static String load; // required argument
     /** Map containing load-specific options. */
-    private final static HashMap loadOpts = new HashMap();
+    private final static HashMap<String, String> loadOpts =
+            new HashMap<String, String>();
     /** The name of the load generator to use in the test. */
     private static String generator = "b2b";
     /** The number of client threads to use in the test. */

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/SequenceGeneratorConcurrency.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/SequenceGeneratorConcurrency.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/SequenceGeneratorConcurrency.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/perf/clients/SequenceGeneratorConcurrency.java Wed May 15 12:11:01 2013
@@ -27,7 +27,6 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Random;
 
 /**
@@ -163,7 +162,7 @@ public class SequenceGeneratorConcurrenc
         private int _clientNumber;
         private int _transactionCount;
         private int _errorCount = 0;
-        private HashMap _errorLog;
+        private HashMap<String, int[]> _errorLog;
 
         private static int _clientCount = 0;
 
@@ -175,7 +174,7 @@ public class SequenceGeneratorConcurrenc
         {
             _clientNumber = _clientCount++;
             _transactionCount = 0;
-            _errorLog = new HashMap();
+            _errorLog = new HashMap<String, int[]>();
             _loadOptions = new LoadOptions();
 
             _psArray = new PreparedStatement[ _loadOptions.getNumberOfGenerators() ] [ _loadOptions.getTablesPerGenerator() + 1 ];
@@ -325,11 +324,7 @@ public class SequenceGeneratorConcurrenc
 
         public void printReport(PrintStream out)
         {
-            Iterator keyIterator = _errorLog.keySet().iterator();
-
-            while ( keyIterator.hasNext() )
-            {
-                String key = (String) keyIterator.next();
+            for (String key : _errorLog.keySet()) {
                 int[] value = (int[]) _errorLog.get( key );
 
                 String message = "    Client " + _clientNumber + " saw " + value[0] + " instances of this error: " + key;
@@ -358,7 +353,7 @@ public class SequenceGeneratorConcurrenc
             _errorCount++;
             
             String key = t.getClass().getName() + ": " + t.getMessage();
-            int[] value = (int[]) _errorLog.get( key );
+            int[] value = _errorLog.get( key );
 
             if ( value != null ) { value[ 0 ] = value[ 0 ] + 1; }
             else

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml Wed May 15 12:11:01 2013
@@ -73,6 +73,7 @@
         <pathelement path="${junit}"/>
       </classpath>
       <include name="${derby.testing.system.dir}/mailjdbc/**/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
 
 	 <copy todir="${out.dir}/${derby.testing.system.dir}/mailjdbc/schema">

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/DbTasks.java Wed May 15 12:11:01 2013
@@ -662,8 +662,7 @@ public class DbTasks {
 			int del_count = 0;
 			int count = 0;
 			int diff = 0;
-			ArrayList idArray = new ArrayList();
-			Integer id_element = new Integer(0);
+			ArrayList<Integer> idArray = new ArrayList<Integer>();
 			Statement stmt = conn.createStatement();
 			Statement stmt1 = conn.createStatement();
 			Statement stmt2 = conn.createStatement();
@@ -679,8 +678,7 @@ public class DbTasks {
 				ResultSet rs1 = stmt1
 						.executeQuery("select id from REFRESH.INBOX");
 				while (rs1.next()) {
-					id_element = new Integer(rs1.getInt(1));
-					idArray.add(id_element);
+					idArray.add(rs1.getInt(1));
 				}
 				for (int i = 0; i <= diff; i++) {
 					del_count = del_count

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/ThreadUtils.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/ThreadUtils.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/ThreadUtils.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/mailjdbc/utils/ThreadUtils.java Wed May 15 12:11:01 2013
@@ -32,7 +32,7 @@ import org.apache.derbyTesting.system.ma
 import org.apache.derbyTesting.system.mailjdbc.tasks.Refresh;
 
 public class ThreadUtils {
-	private static ArrayList userThreads = new ArrayList();
+	private static ArrayList<Thread> userThreads = new ArrayList<Thread>();
 
 	public static ThreadUtils threadutil = new ThreadUtils();
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/nstest/build.xml Wed May 15 12:11:01 2013
@@ -73,6 +73,7 @@
         <pathelement path="${junit}"/>
       </classpath>
       <include name="${derby.testing.system.dir}/nstest/**/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
 
 	 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/build.xml Wed May 15 12:11:01 2013
@@ -73,6 +73,7 @@
         <pathelement path="${junit}"/>
       </classpath>
       <include name="${derby.testing.system.dir}/oe/**/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
 
 	 <copy todir="${out.dir}/${derby.testing.system.dir}/oe/schema">

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/Standard.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/Standard.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/Standard.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/Standard.java Wed May 15 12:11:01 2013
@@ -68,7 +68,7 @@ public class Standard extends StatementH
     
     private final Order order = new Order();
     
-    private final List nameList = new ArrayList();
+    private final List<Object> nameList = new ArrayList<Object>();
 
 
     /**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/StatementHelper.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/StatementHelper.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/StatementHelper.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/direct/StatementHelper.java Wed May 15 12:11:01 2013
@@ -24,7 +24,6 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.IdentityHashMap;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.derbyTesting.system.oe.model.Address;
@@ -60,7 +59,8 @@ class StatementHelper {
      * such as a Java procedure which could have a different
      * prepareStatement method.
      */
-    private Map statements = new IdentityHashMap();
+    private Map<String, PreparedStatement> statements =
+            new IdentityHashMap<String, PreparedStatement>();
 
     /**
      * Prepare a statement, looking in the map first.
@@ -68,7 +68,7 @@ class StatementHelper {
      * it is prepared and put into the map for future use.
      */
     protected PreparedStatement prepareStatement(String sql) throws SQLException {
-        PreparedStatement ps = (PreparedStatement) statements.get(sql);
+        PreparedStatement ps = statements.get(sql);
         if (ps != null)
             return ps;
         
@@ -82,11 +82,7 @@ class StatementHelper {
     }
 
     public void close() throws SQLException {
-              
-        for (Iterator i = statements.keySet().iterator(); i.hasNext(); )
-        {
-            String sql = (String) i.next();
-            PreparedStatement ps = (PreparedStatement) statements.get(sql);
+        for (PreparedStatement ps : statements.values()) {
             ps.close();
         }
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/test/OperationsTester.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/test/OperationsTester.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/test/OperationsTester.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/oe/test/OperationsTester.java Wed May 15 12:11:01 2013
@@ -73,7 +73,7 @@ public class OperationsTester extends Ba
             short d = rand.district();
             int threshold = rand.threshold();
             
-            HashMap inputData = new HashMap();
+            HashMap<String, Number> inputData = new HashMap<String, Number>();
             inputData.put("d", new Short(d));
             inputData.put("threshold", new Integer(threshold));
             
@@ -101,7 +101,7 @@ public class OperationsTester extends Ba
             short d = rand.district();
             int c = rand.NURand1023();
             
-            HashMap inputData = new HashMap();
+            HashMap<String, Number> inputData = new HashMap<String, Number>();
             inputData.put("d", new Short(d));
             inputData.put("c", new Integer(c));
 
@@ -118,7 +118,7 @@ public class OperationsTester extends Ba
             short d = rand.district();
             String customerLast = rand.randomCLast();
             
-            HashMap inputData = new HashMap();
+            HashMap<String, Object> inputData = new HashMap<String, Object>();
             inputData.put("d", new Short(d));
             inputData.put("customerLast", customerLast);
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/build.xml Wed May 15 12:11:01 2013
@@ -73,6 +73,7 @@
         <pathelement path="${junit}"/>
       </classpath>
       <include name="${derby.testing.system.dir}/optimizer/**/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>
 
 	 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/GenericQuery.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/GenericQuery.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/GenericQuery.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/GenericQuery.java Wed May 15 12:11:01 2013
@@ -44,9 +44,9 @@ import org.apache.derbyTesting.system.op
 public  class GenericQuery {
 	protected String description="Custom Test Query";
 	protected Connection conn=null;
-	protected ArrayList queries=new ArrayList(); 
-	protected ArrayList prepStmtRunResults=new ArrayList(); //times using PreparedStatement
-	protected ArrayList stmtRunResults=new ArrayList(); //times using Statement
+	protected ArrayList<String> queries = new ArrayList<String>();
+	protected ArrayList<String[]> prepStmtRunResults = new ArrayList<String[]>(); //times using PreparedStatement
+	protected ArrayList<String[]> stmtRunResults = new ArrayList<String[]>(); //times using Statement
 	protected int[] rowsExpected=null; //add rows expected
 	
 	public void setConnection(Connection con){
@@ -59,7 +59,7 @@ public  class GenericQuery {
 		Enumeration qenum=prop.keys();
 		while(qenum.hasMoreElements()){
 			String queryName=(String)qenum.nextElement();
-			queries.add(prop.get(queryName));
+			queries.add(prop.getProperty(queryName));
 		}
 	}
 		
@@ -80,7 +80,7 @@ public  class GenericQuery {
 		try{
 			for(int k=0;k<queries.size();k++){
 				
-				query=(String)queries.get(k);
+				query = queries.get(k);
 				String [] times=new String [StaticValues.ITER];
 				int rowsReturned=0;
 				for (int i=0;i<StaticValues.ITER;i++){ 
@@ -139,10 +139,10 @@ public  class GenericQuery {
 			throw new SQLException("Failed query:\n "+query+"\n SQLState= "+sqe.getSQLState()+"\n ErrorCode= "+sqe.getErrorCode()+"\n Message= "+sqe.getMessage());
 		}
 	}
-	public ArrayList getPrepStmtRunResults() {
+	public ArrayList<String[]> getPrepStmtRunResults() {
 		return prepStmtRunResults;
 	}
-	public ArrayList getStmtRunResults() {
+	public ArrayList<String[]> getStmtRunResults() {
 		return stmtRunResults;
 	}
 	public int getRowsExpected(int index) {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/QueryList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/QueryList.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/QueryList.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/query/QueryList.java Wed May 15 12:11:01 2013
@@ -34,7 +34,7 @@ import java.util.Properties;
 import org.apache.derbyTesting.system.optimizer.StaticValues;
 
 public class QueryList {
-	private static ArrayList qList=new ArrayList();
+	private static ArrayList<GenericQuery> qList = new ArrayList<GenericQuery>();
 	public static boolean queryListOnly=false;
 	public static void init(Connection conn){
 		GenericQuery q=new GenericQuery();
@@ -69,7 +69,7 @@ public class QueryList {
 		getQList().add(q);
 		
 	}
-	public static ArrayList getQList() {
+	public static ArrayList<GenericQuery> getQList() {
 		return qList;
 	}
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/utils/TestViews.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/utils/TestViews.java?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/utils/TestViews.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/optimizer/utils/TestViews.java Wed May 15 12:11:01 2013
@@ -28,9 +28,9 @@ import java.util.ArrayList;
  * 
  */
 public class TestViews {
-	static ArrayList dropViews = new ArrayList();
+	static ArrayList<String> dropViews = new ArrayList<String>();
 
-	static ArrayList createViews = new ArrayList();
+	static ArrayList<String> createViews = new ArrayList<String>();
 
 	public static void init() {
 		setDropViews();

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/build.xml?rev=1482780&r1=1482779&r2=1482780&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/build.xml (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/system/sttest/build.xml Wed May 15 12:11:01 2013
@@ -73,6 +73,7 @@
         <pathelement path="${junit}"/>
       </classpath>
       <include name="${derby.testing.system.dir}/sttest/**/*.java"/>
+      <compilerarg value="-Xlint"/>
     </javac>