From c0f054549b9e04206da4787b5b96e0f5766eafbf Mon Sep 17 00:00:00 2001 From: Ian Farmer Date: Thu, 19 Jul 2007 04:23:42 +0000 Subject: [PATCH] Change the pom.xml and remove some use of Java 1.5 features to reduce the number of errors produced by "mvn package". --- pom.xml | 9 +++++++++ src/test/java/lua/StandardTest.java | 12 +++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 1beaf906..e4782e2c 100644 --- a/pom.xml +++ b/pom.xml @@ -10,4 +10,13 @@ luaj + + + + junit + junit + 3.8.1 + test + + diff --git a/src/test/java/lua/StandardTest.java b/src/test/java/lua/StandardTest.java index b364186c..7bcb2096 100644 --- a/src/test/java/lua/StandardTest.java +++ b/src/test/java/lua/StandardTest.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; +import java.util.Iterator; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; @@ -23,8 +24,8 @@ public class StandardTest extends TestCase { public static Test suite() throws IOException { ZipEntry file; - final HashMap tests = new HashMap(); - final HashMap results = new HashMap(); + final HashMap tests = new HashMap(); + final HashMap results = new HashMap(); InputStream zipStream = StandardTest.class.getResourceAsStream( "/standard-tests.zip" ); ZipInputStream testSuiteArchive = new ZipInputStream( zipStream ); @@ -44,9 +45,10 @@ public class StandardTest extends TestCase { TestSuite suite = new TestSuite(); - for ( final String test : tests.keySet() ) { - final Proto code = tests.get( test ); - final String expectedResult = results.get( test ); + for ( Iterator keys = tests.keySet().iterator(); keys.hasNext(); ) { + String test = (String)keys.next(); + final Proto code = (Proto)tests.get( test ); + final String expectedResult = (String)results.get( test ); if ( code != null && expectedResult != null ) { suite.addTest( new StandardTest( test, code, expectedResult ) );