mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 14:49:22 +00:00
[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
2 changed files with 2 additions and 2 deletions
|
@ -104,6 +104,6 @@ public final class FolderBrowserItem implements Comparable<FolderBrowserItem>
|
||||||
if(name != null)
|
if(name != null)
|
||||||
return name.toLowerCase().compareTo(other.getName().toLowerCase());
|
return name.toLowerCase().compareTo(other.getName().toLowerCase());
|
||||||
else
|
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)
|
if (name != null)
|
||||||
return name.toLowerCase().compareTo(o.getName().toLowerCase());
|
return name.toLowerCase().compareTo(o.getName().toLowerCase());
|
||||||
else
|
else
|
||||||
throw new IllegalArgumentException();
|
throw new NullPointerException("The name of this GameListItem is null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue