From: David ‘Bombe’ Roden Date: Fri, 5 Nov 2010 22:42:33 +0000 (+0100) Subject: Prevent NPE. X-Git-Tag: 0.2-RC1~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a056b1149cb5029b3e973507d5373092249cdd32;p=Sone.git Prevent NPE. --- diff --git a/src/main/java/net/pterodactylus/sone/web/page/StaticPage.java b/src/main/java/net/pterodactylus/sone/web/page/StaticPage.java index 223d66b..a840958 100644 --- a/src/main/java/net/pterodactylus/sone/web/page/StaticPage.java +++ b/src/main/java/net/pterodactylus/sone/web/page/StaticPage.java @@ -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); }