Use JDK 1.6.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Mar 2013 17:15:53 +0000 (18:15 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Mar 2013 17:15:53 +0000 (18:15 +0100)
pom.xml
src/main/java/net/pterodactylus/sonitus/data/sink/Icecast2Sink.java

diff --git a/pom.xml b/pom.xml
index 1121e62..56eda58 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -37,8 +37,8 @@
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>2.0.2</version>
                                <configuration>
-                                       <source>1.7</source>
-                                       <target>1.7</target>
+                                       <source>1.6</source>
+                                       <target>1.6</target>
                                </configuration>
                        </plugin>
                </plugins>
index f3c6039..30801c6 100644 (file)
@@ -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";
        }
 
 }