Author: mrisaliti
Date: Fri Mar 4 21:21:48 2011
New Revision: 1078137
URL:
http://svn.apache.org/viewvc?rev=1078137&view=revLog:
Remove some warning in StringUtilTests (OFBIZ-4102)
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java?rev=1078137&r1=1078136&r2=1078137&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/test/StringUtilTests.java Fri Mar 4 21:21:48 2011
@@ -29,6 +29,7 @@ import org.ofbiz.base.lang.Appender;
import org.ofbiz.base.lang.SourceMonitored;
import org.ofbiz.base.util.GeneralRuntimeException;
import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.base.test.GenericTestCaseBase;
@SourceMonitored
@@ -168,8 +169,8 @@ public class StringUtilTests extends Gen
}
public void testCreateMap() {
- List<String>[] badKeys = new List[] {null, list("1"), list("2")};
- List<String>[] badValues = new List[] {list("one"), null, list("two", "extra")};
+ List<String>[] badKeys = UtilGenerics.cast(new List[] {null, list("1"), list("2")});
+ List<String>[] badValues = UtilGenerics.cast(new List[] {list("one"), null, list("two", "extra")});
for (int i = 0; i < badKeys.length; i++) {
IllegalArgumentException caught = null;
try {