diff --git a/src/test/org/apache/commons/lang/ArrayUtilsTest.java b/src/test/org/apache/commons/lang/ArrayUtilsTest.java index 9127568c3..af6cd603f 100644 --- a/src/test/org/apache/commons/lang/ArrayUtilsTest.java +++ b/src/test/org/apache/commons/lang/ArrayUtilsTest.java @@ -70,7 +70,7 @@ public class ArrayUtilsTest extends TestCase { //----------------------------------------------------------------------- public void testConstructor() { assertNotNull(new ArrayUtils()); - Constructor[] cons = ArrayUtils.class.getDeclaredConstructors(); + Constructor[] cons = ArrayUtils.class.getDeclaredConstructors(); assertEquals(1, cons.length); assertEquals(true, Modifier.isPublic(cons[0].getModifiers())); assertEquals(true, Modifier.isPublic(ArrayUtils.class.getModifiers())); @@ -170,7 +170,7 @@ public class ArrayUtilsTest extends TestCase { //----------------------------------------------------------------------- public void testToMap() { - Map map = ArrayUtils.toMap(new String[][] {{"foo", "bar"}, {"hello", "world"}}); + Map map = ArrayUtils.toMap(new String[][] {{"foo", "bar"}, {"hello", "world"}}); assertEquals("bar", map.get("foo")); assertEquals("world", map.get("hello")); @@ -189,7 +189,7 @@ public class ArrayUtilsTest extends TestCase { fail("exception expected"); } catch (IllegalArgumentException ex) {} - map = ArrayUtils.toMap(new Object[] {new Map.Entry() { + map = ArrayUtils.toMap(new Object[] {new Map.Entry() { public Object getKey() { return "foo"; } diff --git a/src/test/org/apache/commons/lang/ValidateTest.java b/src/test/org/apache/commons/lang/ValidateTest.java index 8b8c3a5c0..0cd7ccd79 100644 --- a/src/test/org/apache/commons/lang/ValidateTest.java +++ b/src/test/org/apache/commons/lang/ValidateTest.java @@ -176,9 +176,9 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testNotEmptyCollection1() { - Collection coll = new ArrayList(); + Collection coll = new ArrayList(); try { - Validate.notEmpty((Collection) null); + Validate.notEmpty((Collection) null); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertEquals("The validated collection is empty", ex.getMessage()); @@ -195,9 +195,9 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testNotEmptyCollection2() { - Collection coll = new ArrayList(); + Collection coll = new ArrayList(); try { - Validate.notEmpty((Collection) null, "MSG"); + Validate.notEmpty((Collection) null, "MSG"); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertEquals("MSG", ex.getMessage()); @@ -214,9 +214,9 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testNotEmptyMap1() { - Map map = new HashMap(); + Map map = new HashMap(); try { - Validate.notEmpty((Map) null); + Validate.notEmpty((Map) null); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertEquals("The validated map is empty", ex.getMessage()); @@ -233,9 +233,9 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testNotEmptyMap2() { - Map map = new HashMap(); + Map map = new HashMap(); try { - Validate.notEmpty((Map) null, "MSG"); + Validate.notEmpty((Map) null, "MSG"); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertEquals("MSG", ex.getMessage()); @@ -510,12 +510,12 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testNoNullElementsCollection1() { - List coll = new ArrayList(); + List coll = new ArrayList(); coll.add("a"); coll.add("b"); Validate.noNullElements(coll); try { - Validate.noNullElements((Collection) null); + Validate.noNullElements((Collection) null); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertEquals("The validated object is null", ex.getMessage()); @@ -531,12 +531,12 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testNoNullElementsCollection2() { - List coll = new ArrayList(); + List coll = new ArrayList(); coll.add("a"); coll.add("b"); Validate.noNullElements(coll, "MSG"); try { - Validate.noNullElements((Collection) null, "MSG"); + Validate.noNullElements((Collection) null, "MSG"); fail("Expecting IllegalArgumentException"); } catch (IllegalArgumentException ex) { assertEquals("The validated object is null", ex.getMessage()); @@ -552,7 +552,7 @@ public class ValidateTest extends TestCase { //----------------------------------------------------------------------- public void testAllElementsOfType() { - List coll = new ArrayList(); + List coll = new ArrayList(); coll.add("a"); coll.add("b"); Validate.allElementsOfType(coll, String.class, "MSG"); @@ -571,7 +571,7 @@ public class ValidateTest extends TestCase { assertEquals("The validated collection contains an element not of type java.lang.String at index: 1", ex.getMessage()); } - coll = new ArrayList(); + coll = new ArrayList(); coll.add(new Integer(5)); coll.add(new Double(2.0d)); Validate.allElementsOfType(coll, Number.class, "MSG"); @@ -591,7 +591,7 @@ public class ValidateTest extends TestCase { public void testConstructor() { assertNotNull(new Validate()); - Constructor[] cons = Validate.class.getDeclaredConstructors(); + Constructor[] cons = Validate.class.getDeclaredConstructors(); assertEquals(1, cons.length); assertEquals(true, Modifier.isPublic(cons[0].getModifiers())); assertEquals(true, Modifier.isPublic(Validate.class.getModifiers()));