From b2222ffddcd6ece5daa677619e9f14dc704d1ce4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 27 Oct 2010 19:46:50 +0200 Subject: [PATCH] Sort Sones ignoring case. --- src/main/java/net/pterodactylus/sone/data/Sone.java | 2 +- src/main/java/net/pterodactylus/sone/web/BlacklistPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/KnownSonesPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/LoginPage.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.7.4