FELIX-5004 : Null is passed to BundleInfoProvider if plugin root is null
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1696212 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/changelog.txt b/webconsole/changelog.txt
index 197eef1..a2d8d16 100644
--- a/webconsole/changelog.txt
+++ b/webconsole/changelog.txt
@@ -1,3 +1,16 @@
+Changes from 4.2.10 to 4.2.12
+-----------------------------
+** Bug
+ * [FELIX-5004] - Null is passed to BundleInfoProvider if plugin root is null
+
+
+Changes from 4.2.8 to 4.2.10
+----------------------------
+** Bug
+ * [FELIX-4852] - Unbinding configuration does not have desired effect
+ * [FELIX-4886] - Check for ConfigAdmin#listConfigurations returning null
+
+
Changes from 4.2.6 to 4.2.8
---------------------------
** Bug
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java b/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
index 3aec8c5..033564b 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
@@ -22,7 +22,7 @@
/**
* This pre-java 5 enum defines all valid bundle information value types.
- *
+ *
* @author Valentin Valchev
*/
public final class BundleInfoType
@@ -34,7 +34,7 @@
* with <code><protocol>://</code> the link will be considered as
* external. Otherwise the link should be absolute link to a local Servlet
* and must always start with <code>/</code>.
- *
+ *
* for security reasons, the protocol cannot be <code>file</code> for
* external links.
*/
@@ -65,7 +65,7 @@
/**
* Returns the name of the type.
- *
+ *
* @return the type name
*/
public final String getName()
@@ -77,7 +77,7 @@
/**
* That method is used to validate if the object is correct for the
* specified type.
- *
+ *
* @param value
* the value that will be validated.
*/
@@ -93,19 +93,19 @@
if ( idx == -1 )
{
if ( !val.startsWith( "/" ) ) //$NON-NLS-1$
- throw new IllegalArgumentException( "Invalid local link" );
+ throw new IllegalArgumentException( "Invalid local link: " + val );
}
else
{
// check external link
if ( val.substring( 0, idx ).equalsIgnoreCase( "file" ) ) //$NON-NLS-1$
- throw new IllegalArgumentException( "External link cannot use file protocol" );
+ throw new IllegalArgumentException( "External link cannot use file protocol: " + value );
}
}
else if ( this == RESOURCE )
{
if ( !( value instanceof URL ) )
- throw new IllegalArgumentException( "Invalid URL" );
+ throw new IllegalArgumentException( "Invalid URL: " + value );
}
}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
index 3bd0461..ba35938 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -822,7 +822,7 @@
}
listHeaders( jw, bundle );
- final String appRoot = ( pluginRoot == null ) ? null : pluginRoot.substring( 0, pluginRoot.lastIndexOf( "/" ) );
+ final String appRoot = ( pluginRoot == null ) ? "" : pluginRoot.substring( 0, pluginRoot.lastIndexOf( "/" ) );
bundleInfoDetails( jw, bundle, appRoot, locale );
jw.endArray();