Compare formats’ encodings disregarding case.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Mar 2013 12:21:31 +0000 (13:21 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Mar 2013 12:21:31 +0000 (13:21 +0100)
src/main/java/net/pterodactylus/sonitus/data/Format.java

index 59ba9ef..fab7967 100644 (file)
@@ -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