From 5f7ba02612b4875a8d9aa5abfb4fc30542c852ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 16 Mar 2013 18:15:53 +0100 Subject: [PATCH] Use JDK 1.6. --- pom.xml | 4 ++-- .../pterodactylus/sonitus/data/sink/Icecast2Sink.java | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) 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"; } } -- 2.7.4