db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r588161 - in /db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc: BiggerTemporaryClobTest.java InternalClobTest.java SmallTemporaryClobTest.java
Date Thu, 25 Oct 2007 08:14:14 GMT
Author: kristwaa
Date: Thu Oct 25 01:14:13 2007
New Revision: 588161

URL: http://svn.apache.org/viewvc?rev=588161&view=rev
Log:
Utilized generics to avoid the unchecked operation warnings.
Should be okay to use Java 5.0 code here, as the package private tests are optional to run.
This is a preparation step for making build targets for compiling and running the package
private tests.
Patch file: n/a


Modified:
    db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/BiggerTemporaryClobTest.java
    db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/InternalClobTest.java
    db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/SmallTemporaryClobTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/BiggerTemporaryClobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/BiggerTemporaryClobTest.java?rev=588161&r1=588160&r2=588161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/BiggerTemporaryClobTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/BiggerTemporaryClobTest.java
Thu Oct 25 01:14:13 2007
@@ -26,6 +26,7 @@
 import org.apache.derbyTesting.functionTests.util.streams.LoopingAlphabetReader;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 /**
@@ -69,7 +70,7 @@
 
     public static Test suite()
             throws Exception {
-        Class theClass = BiggerTemporaryClobTest.class;
+        Class<? extends TestCase> theClass = BiggerTemporaryClobTest.class;
         TestSuite suite = new TestSuite(theClass, "BiggerTemporaryClobTest suite");
         suite.addTest(addModifyingTests(theClass));
         return suite;

Modified: db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/InternalClobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/InternalClobTest.java?rev=588161&r1=588160&r2=588161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/InternalClobTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/InternalClobTest.java Thu
Oct 25 01:14:13 2007
@@ -45,6 +45,7 @@
 import java.sql.SQLException;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 /**
@@ -87,11 +88,11 @@
         super.tearDown();
     }
 
-    protected static Test addModifyingTests(Class theClass)
+    protected static Test addModifyingTests(Class<? extends TestCase> theClass)
             throws Exception {
         TestSuite suite = new TestSuite("Modifying InternalClob test suite");
         Method[] methods = theClass.getMethods();
-        List testMethods = new ArrayList();
+        List<String> testMethods = new ArrayList<String>();
         for (int i=0; i < methods.length; i++) {
             Method m = methods[i];
             if (m.getReturnType().equals(Void.TYPE) &&
@@ -100,10 +101,10 @@
                 testMethods.add(m.getName());
             }
         }
-        Constructor ctor = theClass.getConstructor(new Class[] {String.class});
+        Constructor<? extends Test> ctor = theClass.getConstructor(new Class[] {String.class});
         for (int i=0; i < testMethods.size(); i++) {
-            suite.addTest((Test)ctor.newInstance(
-                new Object[] {(String)testMethods.get(i)}));
+            suite.addTest(ctor.newInstance(
+                new Object[] {testMethods.get(i)}));
         }
         return suite;
     }

Modified: db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/SmallTemporaryClobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/SmallTemporaryClobTest.java?rev=588161&r1=588160&r2=588161&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/SmallTemporaryClobTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derby/impl/jdbc/SmallTemporaryClobTest.java
Thu Oct 25 01:14:13 2007
@@ -26,6 +26,7 @@
 import org.apache.derbyTesting.functionTests.util.streams.LoopingAlphabetReader;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 /**
@@ -71,7 +72,7 @@
 
     public static Test suite()
             throws Exception {
-        Class theClass = SmallTemporaryClobTest.class;
+        Class<? extends TestCase> theClass = SmallTemporaryClobTest.class;
         TestSuite suite = new TestSuite(theClass, "SmallTemporaryClobTest suite");
         suite.addTest(addModifyingTests(theClass));
         return suite;



Mime
View raw message