You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2002/11/22 23:52:40 UTC
cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/functor TestExecutorUtils.java TestTransformerUtils.java
bayard 2002/11/22 14:52:40
Modified: lang/src/test/org/apache/commons/lang/functor
TestExecutorUtils.java TestTransformerUtils.java
Log:
Added JDK 1.2 compliant EMPTY_MAPs
Revision Changes Path
1.2 +6 -3 jakarta-commons/lang/src/test/org/apache/commons/lang/functor/TestExecutorUtils.java
Index: TestExecutorUtils.java
===================================================================
RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/functor/TestExecutorUtils.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestExecutorUtils.java 6 Nov 2002 19:16:15 -0000 1.1
+++ TestExecutorUtils.java 22 Nov 2002 22:52:40 -0000 1.2
@@ -72,6 +72,9 @@
*/
public class TestExecutorUtils extends junit.framework.TestCase {
+ // JDK 1.2 compliancy
+ private static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap());
+
private static final Object cObject = new Object();
private static final Object cString = "Hello";
private static final Object cInteger = new Integer(6);
@@ -413,7 +416,7 @@
public void testSwitchExecutorEx4() {
try {
- ExecutorUtils.switchExecutor(Collections.EMPTY_MAP);
+ ExecutorUtils.switchExecutor(EMPTY_MAP);
} catch (IllegalArgumentException ex) {
return;
}
@@ -487,7 +490,7 @@
public void testSwitchMapExecutorEx2() {
try {
- ExecutorUtils.switchMapExecutor(Collections.EMPTY_MAP);
+ ExecutorUtils.switchMapExecutor(EMPTY_MAP);
} catch (IllegalArgumentException ex) {
return;
}
1.3 +6 -3 jakarta-commons/lang/src/test/org/apache/commons/lang/functor/TestTransformerUtils.java
Index: TestTransformerUtils.java
===================================================================
RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/functor/TestTransformerUtils.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestTransformerUtils.java 6 Nov 2002 19:16:15 -0000 1.2
+++ TestTransformerUtils.java 22 Nov 2002 22:52:40 -0000 1.3
@@ -80,6 +80,9 @@
*/
public class TestTransformerUtils extends junit.framework.TestCase {
+ // JDK 1.2 compliancy
+ private static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap());
+
private static final Object cObject = new Object();
private static final Object cString = "Hello";
private static final Object cInteger = new Integer(6);
@@ -403,7 +406,7 @@
public void testSwitchTransformerEx4() {
try {
- TransformerUtils.switchTransformer(Collections.EMPTY_MAP);
+ TransformerUtils.switchTransformer(EMPTY_MAP);
} catch (IllegalArgumentException ex) {
return;
}
@@ -460,7 +463,7 @@
public void testSwitchMapTransformerEx2() {
try {
- TransformerUtils.switchMapTransformer(Collections.EMPTY_MAP);
+ TransformerUtils.switchMapTransformer(EMPTY_MAP);
} catch (IllegalArgumentException ex) {
return;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>