From ffe233f116f3225d94716a91253ee6df8e020111 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 16 Mar 2013 13:21:31 +0100 Subject: [PATCH] =?utf8?q?Compare=20formats=E2=80=99=20encodings=20disrega?= =?utf8?q?rding=20case.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sonitus/data/Format.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sonitus/data/Format.java b/src/main/java/net/pterodactylus/sonitus/data/Format.java index 59ba9ef..fab7967 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/Format.java +++ b/src/main/java/net/pterodactylus/sonitus/data/Format.java @@ -136,7 +136,7 @@ public class Format { @Override public int hashCode() { - return (channels << 16) ^ frequency ^ encoding.hashCode(); + return (channels << 16) ^ frequency ^ encoding.toUpperCase().hashCode(); } @Override @@ -145,7 +145,7 @@ public class Format { return false; } Format format = (Format) object; - return (format.channels == channels) && (format.frequency == frequency) && format.encoding.equals(encoding()); + return (format.channels == channels) && (format.frequency == frequency) && format.encoding.equalsIgnoreCase(encoding()); } @Override -- 2.7.4