You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2015/06/22 15:00:30 UTC
svn commit: r1686855 [5/5] - in /commons/proper/collections/trunk/src:
changes/ main/java/org/apache/commons/collections4/
main/java/org/apache/commons/collections4/bag/
main/java/org/apache/commons/collections4/bidimap/
main/java/org/apache/commons/co...
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/PredicateUtilsTest.java Mon Jun 22 13:00:27 2015
@@ -16,12 +16,9 @@
*/
package org.apache.commons.collections4;
-import static org.apache.commons.collections4.functors.NullPredicate.nullPredicate;
-import static org.apache.commons.collections4.functors.TruePredicate.truePredicate;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.fail;
+import static org.apache.commons.collections4.functors.NullPredicate.*;
+import static org.apache.commons.collections4.functors.TruePredicate.*;
+import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.Collection;
@@ -133,7 +130,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.notPredicate(TruePredicate.truePredicate()).evaluate(cInteger));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNotPredicateEx() {
PredicateUtils.notPredicate(null);
}
@@ -149,7 +146,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.andPredicate(FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate()).evaluate(null));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAndPredicateEx() {
PredicateUtils.andPredicate(null, null);
}
@@ -199,24 +196,24 @@ public class PredicateUtilsTest extends
assertTrue(AllPredicate.allPredicate(coll), null);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAllPredicateEx1() {
AllPredicate.allPredicate((Predicate<Object>[]) null);
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAllPredicateEx2() {
AllPredicate.<Object>allPredicate(new Predicate[] { null });
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAllPredicateEx3() {
AllPredicate.allPredicate(new Predicate[] { null, null });
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAllPredicateEx4() {
AllPredicate.allPredicate((Collection<Predicate<Object>>) null);
}
@@ -226,7 +223,7 @@ public class PredicateUtilsTest extends
AllPredicate.allPredicate(Collections.<Predicate<Object>>emptyList());
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAllPredicateEx6() {
final Collection<Predicate<Object>> coll = new ArrayList<Predicate<Object>>();
coll.add(null);
@@ -245,7 +242,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.orPredicate(FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate()).evaluate(null));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testOrPredicateEx() {
PredicateUtils.orPredicate(null, null);
}
@@ -296,24 +293,24 @@ public class PredicateUtilsTest extends
assertFalse(PredicateUtils.anyPredicate(coll), null);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAnyPredicateEx1() {
PredicateUtils.anyPredicate((Predicate<Object>[]) null);
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAnyPredicateEx2() {
PredicateUtils.anyPredicate(new Predicate[] {null});
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAnyPredicateEx3() {
PredicateUtils.anyPredicate(new Predicate[] {null, null});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAnyPredicateEx4() {
PredicateUtils.anyPredicate((Collection<Predicate<Object>>) null);
}
@@ -323,7 +320,7 @@ public class PredicateUtilsTest extends
PredicateUtils.anyPredicate(Collections.<Predicate<Object>>emptyList());
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAnyPredicateEx6() {
final Collection<Predicate<Object>> coll = new ArrayList<Predicate<Object>>();
coll.add(null);
@@ -342,7 +339,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.eitherPredicate(FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate()).evaluate(null));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testEitherPredicateEx() {
PredicateUtils.eitherPredicate(null, null);
}
@@ -396,24 +393,24 @@ public class PredicateUtilsTest extends
assertFalse(PredicateUtils.onePredicate(coll), null);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testOnePredicateEx1() {
PredicateUtils.onePredicate((Predicate<Object>[]) null);
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testOnePredicateEx2() {
PredicateUtils.onePredicate(new Predicate[] {null});
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testOnePredicateEx3() {
PredicateUtils.onePredicate(new Predicate[] {null, null});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testOnePredicateEx4() {
PredicateUtils.onePredicate((Collection<Predicate<Object>>) null);
}
@@ -424,7 +421,7 @@ public class PredicateUtilsTest extends
PredicateUtils.onePredicate(Collections.EMPTY_LIST);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testOnePredicateEx6() {
final Collection<Predicate<Object>> coll = new ArrayList<Predicate<Object>>();
coll.add(null);
@@ -443,7 +440,7 @@ public class PredicateUtilsTest extends
assertEquals(true, PredicateUtils.neitherPredicate(FalsePredicate.falsePredicate(), FalsePredicate.falsePredicate()).evaluate(null));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNeitherPredicateEx() {
PredicateUtils.neitherPredicate(null, null);
}
@@ -493,24 +490,24 @@ public class PredicateUtilsTest extends
assertTrue(PredicateUtils.nonePredicate(coll), null);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNonePredicateEx1() {
PredicateUtils.nonePredicate((Predicate<Object>[]) null);
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNonePredicateEx2() {
PredicateUtils.nonePredicate(new Predicate[] {null});
}
@SuppressWarnings("unchecked")
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNonePredicateEx3() {
PredicateUtils.nonePredicate(new Predicate[] {null, null});
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNonePredicateEx4() {
PredicateUtils.nonePredicate((Collection<Predicate<Object>>) null);
}
@@ -520,7 +517,7 @@ public class PredicateUtilsTest extends
PredicateUtils.nonePredicate(Collections.<Predicate<Object>>emptyList());
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNonePredicateEx6() {
final Collection<Predicate<Object>> coll = new ArrayList<Predicate<Object>>();
coll.add(null);
@@ -563,7 +560,7 @@ public class PredicateUtilsTest extends
assertEquals(true, PredicateUtils.asPredicate(TransformerUtils.<Boolean>nopTransformer()).evaluate(true));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testAsPredicateTransformerEx1() {
PredicateUtils.asPredicate(null);
}
@@ -584,7 +581,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.invokerPredicate("isEmpty").evaluate(list));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testInvokerPredicateEx1() {
PredicateUtils.invokerPredicate(null);
}
@@ -612,7 +609,7 @@ public class PredicateUtilsTest extends
"contains", new Class[] {Object.class}, new Object[] {cString}).evaluate(list));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testInvokerPredicate2Ex1() {
PredicateUtils.invokerPredicate(null, null, null);
}
@@ -637,7 +634,7 @@ public class PredicateUtilsTest extends
PredicateUtils.nullIsExceptionPredicate(TruePredicate.truePredicate()).evaluate(null);
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNullIsExceptionPredicateEx1() {
PredicateUtils.nullIsExceptionPredicate(null);
}
@@ -652,7 +649,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.nullIsTruePredicate(FalsePredicate.falsePredicate()).evaluate(new Object()));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNullIsTruePredicateEx1() {
PredicateUtils.nullIsTruePredicate(null);
}
@@ -667,7 +664,7 @@ public class PredicateUtilsTest extends
assertEquals(false, PredicateUtils.nullIsFalsePredicate(FalsePredicate.falsePredicate()).evaluate(new Object()));
}
- @Test(expected=IllegalArgumentException.class)
+ @Test(expected=NullPointerException.class)
public void testNullIsFalsePredicateEx1() {
PredicateUtils.nullIsFalsePredicate(null);
}
@@ -690,7 +687,7 @@ public class PredicateUtilsTest extends
try {
PredicateUtils.transformedPredicate(null, null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
// misc tests
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/QueueUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/QueueUtilsTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/QueueUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/QueueUtilsTest.java Mon Jun 22 13:00:27 2015
@@ -16,9 +16,7 @@
*/
package org.apache.commons.collections4;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.util.LinkedList;
import java.util.Queue;
@@ -47,8 +45,8 @@ public class QueueUtilsTest {
assertTrue("Returned object should be an UnmodifiableQueue.", queue instanceof UnmodifiableQueue);
try {
QueueUtils.unmodifiableQueue(null);
- fail("Expecting IllegalArgumentException for null queue.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null queue.");
+ } catch (final NullPointerException ex) {
// expected
}
@@ -61,14 +59,14 @@ public class QueueUtilsTest {
assertTrue("Returned object should be a PredicatedQueue.", queue instanceof PredicatedQueue);
try {
QueueUtils.predicatedQueue(null, truePredicate);
- fail("Expecting IllegalArgumentException for null queue.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null queue.");
+ } catch (final NullPointerException ex) {
// expected
}
try {
QueueUtils.predicatedQueue(new LinkedList<Object>(), null);
- fail("Expecting IllegalArgumentException for null predicate.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null predicate.");
+ } catch (final NullPointerException ex) {
// expected
}
}
@@ -79,14 +77,14 @@ public class QueueUtilsTest {
assertTrue("Returned object should be an TransformedQueue.", queue instanceof TransformedQueue);
try {
QueueUtils.transformingQueue(null, nopTransformer);
- fail("Expecting IllegalArgumentException for null queue.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null queue.");
+ } catch (final NullPointerException ex) {
// expected
}
try {
QueueUtils.transformingQueue(new LinkedList<Object>(), null);
- fail("Expecting IllegalArgumentException for null transformer.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null transformer.");
+ } catch (final NullPointerException ex) {
// expected
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/SetUtilsTest.java Mon Jun 22 13:00:27 2015
@@ -16,10 +16,7 @@
*/
package org.apache.commons.collections4;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.util.Arrays;
import java.util.Collection;
@@ -47,14 +44,14 @@ public class SetUtilsTest {
assertTrue("returned object should be a PredicatedSet", set instanceof PredicatedSet);
try {
SetUtils.predicatedSet(new HashSet<Object>(), null);
- fail("Expecting IllegalArgumentException for null predicate.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null predicate.");
+ } catch (final NullPointerException ex) {
// expected
}
try {
SetUtils.predicatedSet(null, predicate);
- fail("Expecting IllegalArgumentException for null set.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null set.");
+ } catch (final NullPointerException ex) {
// expected
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TransformerUtilsTest.java Mon Jun 22 13:00:27 2015
@@ -16,10 +16,7 @@
*/
package org.apache.commons.collections4;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.Collection;
@@ -152,7 +149,7 @@ public class TransformerUtilsTest {
assertEquals(cInteger, TransformerUtils.asTransformer(ClosureUtils.nopClosure()).transform(cInteger));
try {
TransformerUtils.asTransformer((Closure<Object>) null);
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
return;
}
fail();
@@ -186,7 +183,7 @@ public class TransformerUtilsTest {
assertEquals(null, TransformerUtils.asTransformer(FactoryUtils.nullFactory()).transform(cInteger));
try {
TransformerUtils.asTransformer((Factory<Object>) null);
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
return;
}
fail();
@@ -215,26 +212,26 @@ public class TransformerUtilsTest {
try {
TransformerUtils.chainedTransformer(null, null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.chainedTransformer((Transformer[]) null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.chainedTransformer((Collection<Transformer<Object, Object>>) null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.chainedTransformer(new Transformer[] {null, null});
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
coll = new ArrayList<Transformer<Object, Object>>();
coll.add(null);
coll.add(null);
TransformerUtils.chainedTransformer(coll);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
// ifTransformer
@@ -266,19 +263,19 @@ public class TransformerUtilsTest {
try {
TransformerUtils.ifTransformer(null, null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.ifTransformer(TruePredicate.truePredicate(), null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.ifTransformer(null, ConstantTransformer.constantTransformer("A"));
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.ifTransformer(null, null, null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
// switchTransformer
@@ -326,19 +323,19 @@ public class TransformerUtilsTest {
try {
TransformerUtils.switchTransformer(null, null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.switchTransformer((Predicate[]) null, (Transformer[]) null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.switchTransformer((Map<Predicate<Object>, Transformer<Object, Object>>) null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.switchTransformer(new Predicate[2], new Transformer[2]);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.switchTransformer(
new Predicate[] { TruePredicate.truePredicate() },
@@ -373,7 +370,7 @@ public class TransformerUtilsTest {
try {
TransformerUtils.switchMapTransformer(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
// invokerTransformer
@@ -390,7 +387,7 @@ public class TransformerUtilsTest {
try {
TransformerUtils.invokerTransformer(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.invokerTransformer("noSuchMethod").transform(new Object());
fail();
@@ -414,7 +411,7 @@ public class TransformerUtilsTest {
try {
TransformerUtils.invokerTransformer(null, null, null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
try {
TransformerUtils.invokerTransformer("noSuchMethod", new Class[] { Object.class },
new Object[] { cString }).transform(new Object());
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TrieUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TrieUtilsTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TrieUtilsTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/TrieUtilsTest.java Mon Jun 22 13:00:27 2015
@@ -16,9 +16,7 @@
*/
package org.apache.commons.collections4;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import org.apache.commons.collections4.trie.PatriciaTrie;
import org.apache.commons.collections4.trie.UnmodifiableTrie;
@@ -40,8 +38,8 @@ public class TrieUtilsTest {
trie instanceof UnmodifiableTrie);
try {
TrieUtils.unmodifiableTrie(null);
- fail("Expecting IllegalArgumentException for null trie.");
- } catch (final IllegalArgumentException ex) {
+ fail("Expecting NullPointerException for null trie.");
+ } catch (final NullPointerException ex) {
// expected
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedBagTest.java Mon Jun 22 13:00:27 2015
@@ -116,8 +116,8 @@ public class PredicatedBagTest<T> extend
}
try {
decorateBag(new HashBag<T>(), null);
- fail("Expecting IllegalArgumentException for null predicate.");
- } catch (final IllegalArgumentException e) {
+ fail("Expecting NullPointerException for null predicate.");
+ } catch (final NullPointerException e) {
// expected
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedSortedBagTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/PredicatedSortedBagTest.java Mon Jun 22 13:00:27 2015
@@ -76,12 +76,12 @@ public class PredicatedSortedBagTest<T>
((PredicatedSortedBag<T>) bag).decorated();
try {
decorateBag(new TreeBag<T>(), null);
- fail("Expecting IllegalArgumentException for null predicate");
- } catch (final IllegalArgumentException e) {}
+ fail("Expecting NullPointerException for null predicate");
+ } catch (final NullPointerException e) {}
try {
decorateBag(nullBag, stringPredicate());
- fail("Expecting IllegalArgumentException for null bag");
- } catch (final IllegalArgumentException e) {}
+ fail("Expecting NullPointerException for null bag");
+ } catch (final NullPointerException e) {}
}
@SuppressWarnings("unchecked")
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableBagTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableBagTest.java Mon Jun 22 13:00:27 2015
@@ -89,7 +89,7 @@ public class UnmodifiableBagTest<E> exte
try {
UnmodifiableBag.unmodifiableBag(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableSortedBagTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableSortedBagTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableSortedBagTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bag/UnmodifiableSortedBagTest.java Mon Jun 22 13:00:27 2015
@@ -89,7 +89,7 @@ public class UnmodifiableSortedBagTest<E
try {
UnmodifiableSortedBag.unmodifiableSortedBag(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableBidiMapTest.java Mon Jun 22 13:00:27 2015
@@ -94,7 +94,7 @@ public class UnmodifiableBidiMapTest<K,
try {
UnmodifiableBidiMap.unmodifiableBidiMap(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableOrderedBidiMapTest.java Mon Jun 22 13:00:27 2015
@@ -104,6 +104,6 @@ public class UnmodifiableOrderedBidiMapT
try {
UnmodifiableOrderedBidiMap.unmodifiableOrderedBidiMap(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/bidimap/UnmodifiableSortedBidiMapTest.java Mon Jun 22 13:00:27 2015
@@ -110,7 +110,7 @@ public class UnmodifiableSortedBidiMapTe
try {
UnmodifiableSortedBidiMap.unmodifiableSortedBidiMap(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollectionTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableBoundedCollectionTest.java Mon Jun 22 13:00:27 2015
@@ -96,7 +96,7 @@ public class UnmodifiableBoundedCollecti
try {
UnmodifiableBoundedCollection.unmodifiableBoundedCollection(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableCollectionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableCollectionTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableCollectionTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/collection/UnmodifiableCollectionTest.java Mon Jun 22 13:00:27 2015
@@ -85,7 +85,7 @@ public class UnmodifiableCollectionTest<
try {
UnmodifiableCollection.unmodifiableCollection(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/functors/AbstractCompositePredicateTest.java Mon Jun 22 13:00:27 2015
@@ -16,15 +16,15 @@
*/
package org.apache.commons.collections4.functors;
-import org.apache.commons.collections4.Predicate;
-import org.junit.Assert;
-import org.junit.Test;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import org.apache.commons.collections4.Predicate;
+import org.junit.Assert;
+import org.junit.Test;
+
/**
* Base class for tests of composite predicates.
*
@@ -100,7 +100,7 @@ public abstract class AbstractCompositeP
/**
* Tests <code>getInstance</code> with a null predicate array.
*/
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = NullPointerException.class)
public final void nullArrayToGetInstance() {
getPredicateInstance((Predicate<T>[]) null);
}
@@ -109,7 +109,7 @@ public abstract class AbstractCompositeP
* Tests <code>getInstance</code> with a single null element in the predicate array.
*/
@SuppressWarnings({"unchecked"})
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = NullPointerException.class)
public final void nullElementInArrayToGetInstance() {
getPredicateInstance(new Predicate[] { null });
}
@@ -118,7 +118,7 @@ public abstract class AbstractCompositeP
* Tests <code>getInstance</code> with two null elements in the predicate array.
*/
@SuppressWarnings({"unchecked"})
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = NullPointerException.class)
public final void nullElementsInArrayToGetInstance() {
getPredicateInstance(new Predicate[] { null, null });
}
@@ -127,7 +127,7 @@ public abstract class AbstractCompositeP
/**
* Tests <code>getInstance</code> with a null predicate collection
*/
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = NullPointerException.class)
public final void nullCollectionToGetInstance() {
getPredicateInstance((Collection<Predicate<T>>) null);
}
@@ -135,7 +135,7 @@ public abstract class AbstractCompositeP
/**
* Tests <code>getInstance</code> with a predicate collection that contains null elements
*/
- @Test(expected = IllegalArgumentException.class)
+ @Test(expected = NullPointerException.class)
public final void nullElementsInCollectionToGetInstance() {
final Collection<Predicate<T>> coll = new ArrayList<Predicate<T>>();
coll.add(null);
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/NodeListIteratorTest.java Mon Jun 22 13:00:27 2015
@@ -15,6 +15,8 @@
*/
package org.apache.commons.collections4.iterators;
+import static org.easymock.EasyMock.*;
+
import java.util.Iterator;
import org.w3c.dom.Element;
@@ -22,10 +24,6 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-
/**
* Tests the NodeListIterator.
*/
@@ -112,8 +110,8 @@ public class NodeListIteratorTest extend
public void testNullConstructor(){
try{
new NodeListIterator((Node) null);
- fail("IllegalArgumentException expected!");
- }catch(final IllegalArgumentException e){
+ fail("NullPointerException expected!");
+ }catch(final NullPointerException e){
// expected.
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableIteratorTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableIteratorTest.java Mon Jun 22 13:00:27 2015
@@ -78,7 +78,7 @@ public class UnmodifiableIteratorTest<E>
try {
UnmodifiableIterator.unmodifiableIterator(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableListIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableListIteratorTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableListIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableListIteratorTest.java Mon Jun 22 13:00:27 2015
@@ -88,7 +88,7 @@ public class UnmodifiableListIteratorTes
try {
UnmodifiableListIterator.umodifiableListIterator(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableMapIteratorTest.java Mon Jun 22 13:00:27 2015
@@ -90,7 +90,7 @@ public class UnmodifiableMapIteratorTest
try {
UnmodifiableMapIterator.unmodifiableMapIterator(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/iterators/UnmodifiableOrderedMapIteratorTest.java Mon Jun 22 13:00:27 2015
@@ -92,7 +92,7 @@ public class UnmodifiableOrderedMapItera
try {
UnmodifiableOrderedMapIterator.unmodifiableOrderedMapIterator(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/UnmodifiableListTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/UnmodifiableListTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/UnmodifiableListTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/list/UnmodifiableListTest.java Mon Jun 22 13:00:27 2015
@@ -89,7 +89,7 @@ public class UnmodifiableListTest<E> ext
try {
UnmodifiableList.unmodifiableList(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
@SuppressWarnings("unchecked")
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/LazySortedMapTest.java Mon Jun 22 13:00:27 2015
@@ -16,7 +16,7 @@
*/
package org.apache.commons.collections4.map;
-import static org.apache.commons.collections4.map.LazySortedMap.lazySortedMap;
+import static org.apache.commons.collections4.map.LazySortedMap.*;
import java.util.Comparator;
import java.util.Map;
@@ -103,14 +103,14 @@ public class LazySortedMapTest<K, V> ext
assertTrue(map instanceof LazySortedMap);
try {
map = lazySortedMap(new TreeMap<Integer, Number>(), (Transformer<Integer, Number>) null);
- fail("Expecting IllegalArgumentException for null transformer");
- } catch (final IllegalArgumentException e) {
+ fail("Expecting NullPointerException for null transformer");
+ } catch (final NullPointerException e) {
// expected
}
try {
map = lazySortedMap((SortedMap<Integer,Number>) null, transformer);
- fail("Expecting IllegalArgumentException for null map");
- } catch (final IllegalArgumentException e) {
+ fail("Expecting NullPointerException for null map");
+ } catch (final NullPointerException e) {
// expected
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/PassiveExpiringMapTest.java Mon Jun 22 13:00:27 2015
@@ -106,7 +106,7 @@ public class PassiveExpiringMapTest<K, V
final Map<String, String> map = null;
new PassiveExpiringMap<String, String>(map);
fail("constructor - exception should have been thrown.");
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
// success
}
@@ -114,7 +114,7 @@ public class PassiveExpiringMapTest<K, V
final ExpirationPolicy<String, String> policy = null;
new PassiveExpiringMap<String, String>(policy);
fail("constructor - exception should have been thrown.");
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
// success
}
@@ -122,7 +122,7 @@ public class PassiveExpiringMapTest<K, V
final TimeUnit unit = null;
new PassiveExpiringMap<String, String>(10L, unit);
fail("constructor - exception should have been thrown.");
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
// success
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableMapTest.java Mon Jun 22 13:00:27 2015
@@ -78,7 +78,7 @@ public class UnmodifiableMapTest<K, V> e
try {
UnmodifiableMap.unmodifiableMap(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableOrderedMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableOrderedMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableOrderedMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableOrderedMapTest.java Mon Jun 22 13:00:27 2015
@@ -77,7 +77,7 @@ public class UnmodifiableOrderedMapTest<
try {
UnmodifiableOrderedMap.unmodifiableOrderedMap(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/map/UnmodifiableSortedMapTest.java Mon Jun 22 13:00:27 2015
@@ -77,7 +77,7 @@ public class UnmodifiableSortedMapTest<K
try {
UnmodifiableSortedMap.unmodifiableSortedMap(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/queue/UnmodifiableQueueTest.java Mon Jun 22 13:00:27 2015
@@ -104,7 +104,7 @@ public class UnmodifiableQueueTest<E> ex
try {
UnmodifiableQueue.unmodifiableQueue(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/ListOrderedSetTest.java Mon Jun 22 13:00:27 2015
@@ -253,27 +253,27 @@ public class ListOrderedSetTest<E>
try {
ListOrderedSet.listOrderedSet((List<E>) null);
fail();
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
}
try {
ListOrderedSet.listOrderedSet((Set<E>) null);
fail();
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
}
try {
ListOrderedSet.listOrderedSet(null, null);
fail();
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
}
try {
ListOrderedSet.listOrderedSet(new HashSet<E>(), null);
fail();
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
}
try {
ListOrderedSet.listOrderedSet(null, new ArrayList<E>());
fail();
- } catch (final IllegalArgumentException ex) {
+ } catch (final NullPointerException ex) {
}
}
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableNavigableSetTest.java Mon Jun 22 13:00:27 2015
@@ -101,7 +101,7 @@ public class UnmodifiableNavigableSetTes
try {
UnmodifiableNavigableSet.unmodifiableNavigableSet(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
/**
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSetTest.java Mon Jun 22 13:00:27 2015
@@ -79,7 +79,7 @@ public class UnmodifiableSetTest<E> exte
try {
UnmodifiableSet.unmodifiableSet(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/set/UnmodifiableSortedSetTest.java Mon Jun 22 13:00:27 2015
@@ -96,7 +96,7 @@ public class UnmodifiableSortedSetTest<E
try {
UnmodifiableSortedSet.unmodifiableSortedSet(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
/**
Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java?rev=1686855&r1=1686854&r2=1686855&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java (original)
+++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections4/trie/UnmodifiableTrieTest.java Mon Jun 22 13:00:27 2015
@@ -83,7 +83,7 @@ public class UnmodifiableTrieTest<V> ext
try {
UnmodifiableTrie.unmodifiableTrie(null);
fail();
- } catch (final IllegalArgumentException ex) {}
+ } catch (final NullPointerException ex) {}
}
//-----------------------------------------------------------------------