Sort Sones ignoring case.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Oct 2010 17:46:50 +0000 (19:46 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 27 Oct 2010 17:46:50 +0000 (19:46 +0200)
src/main/java/net/pterodactylus/sone/data/Sone.java
src/main/java/net/pterodactylus/sone/web/BlacklistPage.java
src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java
src/main/java/net/pterodactylus/sone/web/LoginPage.java

index 661a13c..dd31c03 100644 (file)
@@ -227,7 +227,7 @@ public class Sone {
 
                        @Override
                        public int compare(Sone leftSone, Sone rightSone) {
-                               int diff = SoneAccessor.getNiceName(leftSone).compareTo(SoneAccessor.getNiceName(rightSone));
+                               int diff = SoneAccessor.getNiceName(leftSone).compareToIgnoreCase(SoneAccessor.getNiceName(rightSone));
                                if (diff != 0) {
                                        return diff;
                                }
index 50146d2..ce83fad 100644 (file)
@@ -60,7 +60,7 @@ public class BlacklistPage extends SoneTemplatePage {
 
                        @Override
                        public int compare(Sone leftSone, Sone rightSone) {
-                               return SoneAccessor.getNiceName(leftSone).compareTo(SoneAccessor.getNiceName(rightSone));
+                               return SoneAccessor.getNiceName(leftSone).compareToIgnoreCase(SoneAccessor.getNiceName(rightSone));
                        }
 
                });
index ea6f786..0904619 100644 (file)
@@ -60,7 +60,7 @@ public class KnownSonesPage extends SoneTemplatePage {
 
                        @Override
                        public int compare(Sone leftSone, Sone rightSone) {
-                               int diff = SoneAccessor.getNiceName(leftSone).compareTo(SoneAccessor.getNiceName(rightSone));
+                               int diff = SoneAccessor.getNiceName(leftSone).compareToIgnoreCase(SoneAccessor.getNiceName(rightSone));
                                if (diff != 0) {
                                        return diff;
                                }
index 1dd0659..c859cf6 100644 (file)
@@ -62,7 +62,7 @@ public class LoginPage extends SoneTemplatePage {
 
                        @Override
                        public int compare(Sone leftSone, Sone rightSone) {
-                               int diff = SoneAccessor.getNiceName(leftSone).compareTo(SoneAccessor.getNiceName(rightSone));
+                               int diff = SoneAccessor.getNiceName(leftSone).compareToIgnoreCase(SoneAccessor.getNiceName(rightSone));
                                if (diff != 0) {
                                        return diff;
                                }