Pretty sure truthiness is never null.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2961 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -213,7 +213,7 @@ public class ListUtil
|
|||||||
protected static Object[] testAndAdd (
|
protected static Object[] testAndAdd (
|
||||||
EqualityComparator eqc, Object[] list, Object element)
|
EqualityComparator eqc, Object[] list, Object element)
|
||||||
{
|
{
|
||||||
requireNotNull(element == null);
|
requireNotNull(element);
|
||||||
|
|
||||||
// make sure we've got a list to work with
|
// make sure we've got a list to work with
|
||||||
if (list == null) {
|
if (list == null) {
|
||||||
@@ -324,7 +324,7 @@ public class ListUtil
|
|||||||
protected static int indexOf (
|
protected static int indexOf (
|
||||||
EqualityComparator eqc, Object[] list, Object element)
|
EqualityComparator eqc, Object[] list, Object element)
|
||||||
{
|
{
|
||||||
requireNotNull(element == null);
|
requireNotNull(element);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
for (int ii = 0, nn = list.length; ii < nn; ii++) {
|
for (int ii = 0, nn = list.length; ii < nn; ii++) {
|
||||||
if (eqc.equals(list[ii], element)) {
|
if (eqc.equals(list[ii], element)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user