[Android] Give the exceptions in compareTo implementations in GameListItem and FolderBrowserItem some messages. If the exceptions ever actually get thrown, at least you're given a reason as to why the exception was thrown now. Also changed the exception type to NullPointerException. IllegalArgumentException is intended to be used for validating the parameters in constructors/methods.
This commit is contained in:
parent
484130049d
commit
ce5f80b151
|
@ -104,6 +104,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
|
|||
if(name != null)
|
||||
return name.toLowerCase().compareTo(other.getName().toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
throw new NullPointerException("The name of this FolderBrowserItem is null");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ public final class GameListItem implements Comparable<GameListItem>
|
|||
if (name != null)
|
||||
return name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
throw new NullPointerException("The name of this GameListItem is null");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue