FELIX-2017 prevent NullPointerException if URLConnection.getInputStream() returns
null instead of throwing for a non-existing resource.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@903968 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
index 077924a..693aa70 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
@@ -346,6 +346,14 @@
             URLConnection connection = url.openConnection();
             ins = connection.getInputStream();
 
+            // FELIX-2017 Equinox may return an URL for a non-existing
+            // resource but then (instead of throwing) return null on
+            // getInputStream. We should account for this situation and
+            // just assume a non-existing resource in this case.
+            if (ins == null) {
+                return false;
+            }
+
             // check whether we may return 304/UNMODIFIED
             long lastModified = connection.getLastModified();
             if ( lastModified > 0 )