From a056b1149cb5029b3e973507d5373092249cdd32 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 5 Nov 2010 23:42:33 +0100 Subject: [PATCH] Prevent NPE. --- src/main/java/net/pterodactylus/sone/web/page/StaticPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.7.4