Change the pom.xml and remove some use of Java 1.5 features to reduce the

number of errors produced by "mvn package".
This commit is contained in:
Ian Farmer
2007-07-19 04:23:42 +00:00
parent 2a64db32b5
commit c0f054549b
2 changed files with 16 additions and 5 deletions

View File

@@ -10,4 +10,13 @@
<build> <build>
<finalName>luaj</finalName> <finalName>luaj</finalName>
</build> </build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project> </project>

View File

@@ -5,6 +5,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
@@ -23,8 +24,8 @@ public class StandardTest extends TestCase {
public static Test suite() throws IOException { public static Test suite() throws IOException {
ZipEntry file; ZipEntry file;
final HashMap<String, Proto> tests = new HashMap<String, Proto>(); final HashMap tests = new HashMap();
final HashMap<String, String> results = new HashMap<String, String>(); final HashMap results = new HashMap();
InputStream zipStream = StandardTest.class.getResourceAsStream( "/standard-tests.zip" ); InputStream zipStream = StandardTest.class.getResourceAsStream( "/standard-tests.zip" );
ZipInputStream testSuiteArchive = new ZipInputStream( zipStream ); ZipInputStream testSuiteArchive = new ZipInputStream( zipStream );
@@ -44,9 +45,10 @@ public class StandardTest extends TestCase {
TestSuite suite = new TestSuite(); TestSuite suite = new TestSuite();
for ( final String test : tests.keySet() ) { for ( Iterator keys = tests.keySet().iterator(); keys.hasNext(); ) {
final Proto code = tests.get( test ); String test = (String)keys.next();
final String expectedResult = results.get( test ); final Proto code = (Proto)tests.get( test );
final String expectedResult = (String)results.get( test );
if ( code != null && expectedResult != null ) { if ( code != null && expectedResult != null ) {
suite.addTest( new StandardTest( test, code, expectedResult ) ); suite.addTest( new StandardTest( test, code, expectedResult ) );