Upon further thought- nobody should be calling SortableArrayList.contains()
with null elements anyway because SortableArrayList just plain does not support nulls. That's fine, Collections have the option of suporting null elements, but let's just have the underlying implementation (ListUtil) throw a NPE if needed. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1521 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -156,11 +156,7 @@ public class SortableArrayList extends AbstractList
|
||||
// documentation inherited from interface
|
||||
public boolean contains (Object o)
|
||||
{
|
||||
// we can't use ListUtil.contains() because our _elements
|
||||
// array is larger than _size and we want to do the right thing
|
||||
// if null is passed in.
|
||||
int dex = ListUtil.indexOf(_elements, o);
|
||||
return (dex >= 0 && dex < _size);
|
||||
return ListUtil.contains(_elements, o);
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
|
||||
Reference in New Issue
Block a user