Skip to content
Permalink
Browse files
remove Xlint warning
  • Loading branch information
paulk-asert committed Apr 13, 2022
1 parent e2fd9e6 commit d1ded1c8eebc4a2434b474999fb7d7726d52c935
Showing 1 changed file with 3 additions and 2 deletions.
@@ -21,6 +21,7 @@
import groovy.lang.GroovyClassLoader;
import groovy.lang.Script;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import org.apache.groovy.test.ScriptTestAdapter;
@@ -77,7 +78,7 @@ public void loadTestSuite() throws Exception {
throw new RuntimeException("No filename given in the 'test' system property so cannot run a Groovy unit test");
}
System.out.println("Compiling: " + fileName);
Class type = compile(fileName);
Class<? extends TestCase> type = compile(fileName);
String[] args = {};
if (!Test.class.isAssignableFrom(type) && Script.class.isAssignableFrom(type)) {
// let's treat the script as a Test
@@ -87,7 +88,7 @@ public void loadTestSuite() throws Exception {
}
}

public Class compile(String fileName) throws Exception {
public Class<? extends TestCase> compile(String fileName) throws Exception {
return loader.parseClass(new File(fileName));
}
}

0 comments on commit d1ded1c

Please sign in to comment.