Merge branch 'master' of https://gitbox.apache.org/repos/asf/commons-collections.git
This commit is contained in:
commit
dd69cc72dc
|
@ -126,7 +126,7 @@ public class MultiKey<K> implements Serializable {
|
||||||
* This is equivalent to <code>new MultiKey(keys, true)</code>.
|
* This is equivalent to <code>new MultiKey(keys, true)</code>.
|
||||||
*
|
*
|
||||||
* @param keys the array of keys, not null
|
* @param keys the array of keys, not null
|
||||||
* @throws IllegalArgumentException if the key array is null
|
* @throws NullPointerException if the key array is null
|
||||||
*/
|
*/
|
||||||
public MultiKey(final K[] keys) {
|
public MultiKey(final K[] keys) {
|
||||||
this(keys, true);
|
this(keys, true);
|
||||||
|
@ -153,13 +153,13 @@ public class MultiKey<K> implements Serializable {
|
||||||
*
|
*
|
||||||
* @param keys the array of keys, not null
|
* @param keys the array of keys, not null
|
||||||
* @param makeClone true to clone the array, false to assign it
|
* @param makeClone true to clone the array, false to assign it
|
||||||
* @throws IllegalArgumentException if the key array is null
|
* @throws NullPointerException if the key array is null
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public MultiKey(final K[] keys, final boolean makeClone) {
|
public MultiKey(final K[] keys, final boolean makeClone) {
|
||||||
super();
|
super();
|
||||||
if (keys == null) {
|
if (keys == null) {
|
||||||
throw new IllegalArgumentException("The array of keys must not be null");
|
throw new NullPointerException("The array of keys must not be null");
|
||||||
}
|
}
|
||||||
if (makeClone) {
|
if (makeClone) {
|
||||||
this.keys = keys.clone();
|
this.keys = keys.clone();
|
||||||
|
|
|
@ -147,7 +147,7 @@ public class ListOrderedSet<E>
|
||||||
* Constructor that wraps (not copies).
|
* Constructor that wraps (not copies).
|
||||||
*
|
*
|
||||||
* @param set the set to decorate, must not be null
|
* @param set the set to decorate, must not be null
|
||||||
* @throws IllegalArgumentException if set is null
|
* @throws NullPointerException if set is null
|
||||||
*/
|
*/
|
||||||
protected ListOrderedSet(final Set<E> set) {
|
protected ListOrderedSet(final Set<E> set) {
|
||||||
super(set);
|
super(set);
|
||||||
|
|
|
@ -96,15 +96,15 @@ public class MultiKeyTest {
|
||||||
try {
|
try {
|
||||||
new MultiKey<>(keys);
|
new MultiKey<>(keys);
|
||||||
fail();
|
fail();
|
||||||
} catch (final IllegalArgumentException ex) {}
|
} catch (final NullPointerException ex) {}
|
||||||
try {
|
try {
|
||||||
new MultiKey<>(keys, true);
|
new MultiKey<>(keys, true);
|
||||||
fail();
|
fail();
|
||||||
} catch (final IllegalArgumentException ex) {}
|
} catch (final NullPointerException ex) {}
|
||||||
try {
|
try {
|
||||||
new MultiKey<>(keys, false);
|
new MultiKey<>(keys, false);
|
||||||
fail();
|
fail();
|
||||||
} catch (final IllegalArgumentException ex) {}
|
} catch (final NullPointerException ex) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue