mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 14:39:01 +01: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
@ -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…
x
Reference in New Issue
Block a user