Prevent NPE.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Nov 2010 22:42:33 +0000 (23:42 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Nov 2010 22:42:33 +0000 (23:42 +0100)
src/main/java/net/pterodactylus/sone/web/page/StaticPage.java

index 223d66b..a840958 100644 (file)
@@ -69,7 +69,7 @@ public class StaticPage implements Page {
                String filename = path.substring(lastSlash + 1);
                InputStream fileInputStream = getClass().getResourceAsStream(resourcePathPrefix + filename);
                if (fileInputStream == null) {
-                       return new Response(404, "Not found.", null, (String) null);
+                       return new Response(404, "Not found.", null, "");
                }
                return new Response(200, "OK", mimeType, null, fileInputStream);
        }