From ce5f80b151d2343879cea0168ff70fee17172b6d Mon Sep 17 00:00:00 2001 From: lioncash Date: Tue, 10 Sep 2013 08:32:11 -0400 Subject: [PATCH] [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. --- .../dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java | 2 +- .../src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java index e081c061fe..c2b2723664 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/folderbrowser/FolderBrowserItem.java @@ -104,6 +104,6 @@ public final class FolderBrowserItem implements Comparable if(name != null) return name.toLowerCase().compareTo(other.getName().toLowerCase()); else - throw new IllegalArgumentException(); + throw new NullPointerException("The name of this FolderBrowserItem is null"); } } diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java index f65740dec3..67d61256d4 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/gamelist/GameListItem.java @@ -117,7 +117,7 @@ public final class GameListItem implements Comparable if (name != null) return name.toLowerCase().compareTo(o.getName().toLowerCase()); else - throw new IllegalArgumentException(); + throw new NullPointerException("The name of this GameListItem is null"); } }