felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r728463 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
Date Sun, 21 Dec 2008 17:54:08 GMT
Author: cziegeler
Date: Sun Dec 21 09:54:08 2008
New Revision: 728463

URL: http://svn.apache.org/viewvc?rev=728463&view=rev
Log:
Factory pid has been returned twice in the resulting json. As the factory pid will be included
by addConfiguration() this statement can be removed.

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java?rev=728463&r1=728462&r2=728463&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
Sun Dec 21 09:54:08 2008
@@ -17,24 +17,9 @@
 package org.apache.felix.webconsole.internal.compendium;
 
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
+import java.io.*;
 import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-import java.util.SortedMap;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.Vector;
+import java.util.*;
 import java.util.Map.Entry;
 
 import javax.servlet.http.HttpServletRequest;
@@ -42,18 +27,9 @@
 
 import org.apache.felix.webconsole.internal.Util;
 import org.apache.felix.webconsole.internal.servlet.OsgiManager;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONWriter;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Constants;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.Version;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.cm.ManagedService;
-import org.osgi.service.cm.ManagedServiceFactory;
+import org.json.*;
+import org.osgi.framework.*;
+import org.osgi.service.cm.*;
 import org.osgi.service.metatype.AttributeDefinition;
 import org.osgi.service.metatype.ObjectClassDefinition;
 
@@ -128,7 +104,7 @@
                 if (pidFilter != null) {
                     redirect += "?" + PID_FILTER + "=" + pidFilter;
                 }
-                
+
                 response.sendRedirect( redirect );
             }
 
@@ -156,7 +132,7 @@
         // extract the configuration pid from the request path
         String pid = request.getPathInfo();
         pid = pid.substring( pid.lastIndexOf( '/' ) + 1 );
-        
+
         // check whether the pid is actually a filter for the selection
         // of configurations to display, if the filter correctly converts
         // into an OSGi filter, we use it to select configurations
@@ -169,7 +145,7 @@
         try
         {
             getBundleContext().createFilter( pidFilter );
-            
+
             // if the pidFilter was set from the pid, clear the pid
             if ( pid == pidFilter )
             {
@@ -232,7 +208,7 @@
         {
             config = getConfiguration( getConfigurationAdmin(), pid );
         }
-        
+
         if ( config != null )
         {
             Util.startScript( pw );
@@ -439,12 +415,6 @@
         json.key( ConfigManager.PID );
         json.value( pid );
 
-        if ( pid == PLACEHOLDER_PID )
-        {
-            json.key( ConfigManager.factoryPID );
-            json.value( config.getFactoryPid() );
-        }
-        
         if ( pidFilter != null )
         {
             json.key( PID_FILTER );



Mime
View raw message