FELIX-933 : Allow direct display of config form even if no config is stored (throug meta type info)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@742891 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
index 8ba2c03..a364682 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
@@ -277,7 +277,7 @@
pw.println( "</table>" );
// if a configuration is addressed, display it immediately
- Configuration config;
+ final Configuration config;
if ( request.getParameter( "create" ) != null && pid != null )
{
config = new PlaceholderConfiguration( pid );
@@ -288,12 +288,12 @@
config = getConfiguration( ca, pid );
}
- if ( config != null )
+ if ( pid != null )
{
Util.startScript( pw );
pw.println( "var configuration=" );
- printConfigurationJson( pw, config.getPid(), config, pidFilter, locale );
+ printConfigurationJson( pw, pid, config, pidFilter, locale );
pw.println( ";" );
pw.println( "displayConfigForm(configuration);" );