From: David ‘Bombe’ Roden Date: Wed, 27 Oct 2010 17:46:50 +0000 (+0200) Subject: Sort Sones ignoring case. X-Git-Tag: 0.1-RC1~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b2222ffddcd6ece5daa677619e9f14dc704d1ce4;p=Sone.git Sort Sones ignoring case. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 661a13c..dd31c03 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -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; } diff --git a/src/main/java/net/pterodactylus/sone/web/BlacklistPage.java b/src/main/java/net/pterodactylus/sone/web/BlacklistPage.java index 50146d2..ce83fad 100644 --- a/src/main/java/net/pterodactylus/sone/web/BlacklistPage.java +++ b/src/main/java/net/pterodactylus/sone/web/BlacklistPage.java @@ -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)); } }); diff --git a/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java b/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java index ea6f786..0904619 100644 --- a/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java +++ b/src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java @@ -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; } diff --git a/src/main/java/net/pterodactylus/sone/web/LoginPage.java b/src/main/java/net/pterodactylus/sone/web/LoginPage.java index 1dd0659..c859cf6 100644 --- a/src/main/java/net/pterodactylus/sone/web/LoginPage.java +++ b/src/main/java/net/pterodactylus/sone/web/LoginPage.java @@ -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; }