< prev index next >

src/com/sun/javatest/junit/JUnitTestRunner.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

@@ -48,16 +48,16 @@
         // might be useful if there are more settings that need to be passed
         // to the MultiTest class.  This class is generally constructed
         // by the corresponding TestSuite class.
     }
 
-    protected boolean runTests(Iterator testIter) throws InterruptedException {
+    protected boolean runTests(Iterator<TestDescription> testIter) throws InterruptedException {
         WorkDirectory wd = getWorkDirectory();
         TestDescription td = null;
         //for (TestDescription td: testIter) {
         for (; testIter.hasNext() ;) {
-            td = (TestDescription)(testIter.next());
+            td = testIter.next();
             TestResult tr = new TestResult(td);
             TestResult.Section outSection = tr.createSection("Main");
 
             notifyStartingTest(tr);
             Status execStatus = getMultiTest(td).run(getTestArgs(td), outSection.createOutput("stdout"), outSection.createOutput("stderr"));

@@ -83,11 +83,11 @@
 
     void setClassLoader(ClassLoader loader) {
         this.loader = loader;
 
         try {
-            Class c = loader.loadClass("com.sun.javatest.junit.JUnitMultiTest");
+            Class<?> c = loader.loadClass("com.sun.javatest.junit.JUnitMultiTest");
         } catch (ClassNotFoundException e) {
             e.printStackTrace();
         }
     }
 
< prev index next >