From: David ‘Bombe’ Roden Date: Sat, 16 Mar 2013 17:15:53 +0000 (+0100) Subject: Use JDK 1.6. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5f7ba02612b4875a8d9aa5abfb4fc30542c852ba;p=sonitus.git Use JDK 1.6. --- diff --git a/pom.xml b/pom.xml index 1121e62..56eda58 100644 --- a/pom.xml +++ b/pom.xml @@ -37,8 +37,8 @@ maven-compiler-plugin 2.0.2 - 1.7 - 1.7 + 1.6 + 1.6 diff --git a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java index f3c6039..30801c6 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java +++ b/src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java @@ -199,16 +199,17 @@ public class Icecast2Sink implements Sink { * @return The MIME type of the format */ private static String getContentType(Format format) { - switch (format.encoding().toUpperCase()) { - case "VORBIS": - return "audio/ogg"; - case "MP3": - return "audio/mpeg"; - case "PCM": - return "audio/vnd.wave"; - default: - return "application/octet-stream"; + String encoding = format.encoding(); + if ("Vorbis".equalsIgnoreCase(encoding)) { + return "audio/ogg"; } + if ("MP3".equalsIgnoreCase(encoding)) { + return "audio/mpeg"; + } + if ("PCM".equalsIgnoreCase(encoding)) { + return "audio/vnd.wave"; + } + return "application/octet-stream"; } }