FELIX-1988 Apply 22.assorted3.patch by Valentin Valchev (thanks)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@912577 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java
index 5eeaeb7..6360fc1 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/AbstractConfigurationPrinter.java
@@ -22,7 +22,10 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
-
+/**
+ * AbstractConfigurationPrinter is an utility class, that provides a basic implementation
+ * of {@link ConfigurationPrinter} and {@link OsgiManagerPlugin} interfaces.
+ */
public abstract class AbstractConfigurationPrinter implements ConfigurationPrinter, OsgiManagerPlugin
{
@@ -31,6 +34,9 @@
private ServiceRegistration registration;
+ /**
+ * @see org.apache.felix.webconsole.internal.OsgiManagerPlugin#activate(org.osgi.framework.BundleContext)
+ */
public void activate( BundleContext bundleContext )
{
this.bundleContext = bundleContext;
@@ -38,6 +44,9 @@
}
+ /**
+ * @see org.apache.felix.webconsole.internal.OsgiManagerPlugin#deactivate()
+ */
public void deactivate()
{
this.registration.unregister();
@@ -45,6 +54,14 @@
}
+ /**
+ * Returns the <code>BundleContext</code> with which this plugin has been
+ * activated. If the plugin has not be activated by calling the
+ * {@link #activate(BundleContext)} method, this method returns
+ * <code>null</code>.
+ *
+ * @return the bundle context or <code>null</code> if the bundle is not activated.
+ */
protected BundleContext getBundleContext()
{
return bundleContext;
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/BaseWebConsolePlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/BaseWebConsolePlugin.java
deleted file mode 100644
index 5490538..0000000
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/BaseWebConsolePlugin.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal;
-
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.service.startlevel.StartLevel;
-import org.osgi.util.tracker.ServiceTracker;
-
-
-public abstract class BaseWebConsolePlugin extends AbstractWebConsolePlugin implements OsgiManagerPlugin
-{
-
- private static String PACKAGE_ADMIN_NAME = PackageAdmin.class.getName();
- private static String START_LEVEL_NAME = StartLevel.class.getName();
-
- private Logger log;
-
- private Map services = new HashMap();
-
-
- public void deactivate()
- {
- for ( Iterator ti = services.values().iterator(); ti.hasNext(); )
- {
- ServiceTracker tracker = ( ServiceTracker ) ti.next();
- tracker.close();
- ti.remove();
- }
-
- if ( log != null )
- {
- log.dispose();
- log = null;
- }
- }
-
-
- protected Logger getLog()
- {
- if ( log == null )
- {
- log = new Logger( getBundleContext() );
- }
-
- return log;
- }
-
-
- protected StartLevel getStartLevel()
- {
- return ( StartLevel ) getService( START_LEVEL_NAME );
- }
-
-
- protected PackageAdmin getPackageAdmin()
- {
- return ( PackageAdmin ) getService( PACKAGE_ADMIN_NAME );
- }
-
-
- protected Object getService( String serviceName )
- {
- ServiceTracker serviceTracker = ( ServiceTracker ) services.get( serviceName );
- if ( serviceTracker == null )
- {
- serviceTracker = new ServiceTracker( getBundleContext(), serviceName, null );
- serviceTracker.open();
-
- services.put( serviceName, serviceTracker );
- }
-
- return serviceTracker.getService();
- }
-}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerActivator.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerActivator.java
index 32749a7..d21c98e 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerActivator.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerActivator.java
@@ -24,18 +24,28 @@
import org.osgi.framework.BundleContext;
+/**
+ * This is the main, starting class of the Bundle. It initializes and disposes
+ * the Apache Web Console upon bundle lifecycle requests.
+ */
public class OsgiManagerActivator implements BundleActivator
{
private OsgiManager osgiManager;
+ /**
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
public void start( BundleContext bundleContext )
{
osgiManager = new OsgiManager( bundleContext );
}
+ /**
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
public void stop( BundleContext arg0 )
{
if ( osgiManager != null )
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerPlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerPlugin.java
index 6918260..c34d338 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerPlugin.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/OsgiManagerPlugin.java
@@ -22,12 +22,30 @@
import org.osgi.framework.BundleContext;
+/**
+ * OsgiManagerPlugin is an internal interface. When a plugin implements this
+ * interface, the Web Console will run it's {@link #activate(BundleContext)} method upon
+ * initialization and {@link #deactivate()}, when disposed.
+ */
public interface OsgiManagerPlugin
{
+ /**
+ * This method is called from the Felix Web Console to ensure the
+ * AbstractWebConsolePlugin is correctly setup.
+ *
+ * It is called right after the Web Console receives notification for
+ * plugin registration.
+ *
+ * @param bundleContext the context of the plugin bundle
+ */
void activate( BundleContext bundleContext );
+ /**
+ * This method is called, by the Web Console to de-activate the plugin and release
+ * all used resources.
+ */
void deactivate();
}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
index dec6149..9c8df60 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
@@ -17,24 +17,25 @@
package org.apache.felix.webconsole.internal;
-import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Enumeration;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.io.IOUtils;
-import org.osgi.framework.*;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Version;
/**
- * The <code>Util</code> TODO
+ * The <code>Util</code> class contains various utility methods used internally
+ * by the web console implementation and the build-in plugins.
*/
public class Util
{
+ // FIXME: from the constants below only PARAM_ACTION is used, consider removeal of others?
+
/** web apps subpage */
public static final String PAGE_WEBAPPS = "/webapps";
@@ -57,47 +58,6 @@
public static final String VALUE_SHUTDOWN = "shutdown";
- public static void startScript( PrintWriter pw )
- {
- pw.println( "<script type='text/javascript'>" );
- pw.println( "// <![CDATA[" );
- }
-
-
- public static void endScript( PrintWriter pw )
- {
- pw.println( "// ]]>" );
- pw.println( "</script>" );
- }
-
- public static void script( PrintWriter pw, String appRoot, String scriptName )
- {
- pw.println( "<script src='" + appRoot + "/res/ui/" + scriptName + "' language='JavaScript'></script>" );
- }
-
- public static void spool( String res, HttpServletResponse resp ) throws IOException
- {
- InputStream ins = getResource( res );
- if ( ins != null )
- {
- try
- {
- IOUtils.copy( ins, resp.getOutputStream() );
- }
- finally
- {
- IOUtils.closeQuietly( ins );
- }
- }
- }
-
-
- private static InputStream getResource( String resource )
- {
- return Util.class.getResourceAsStream( resource );
- }
-
-
/**
* Return a display name for the given <code>bundle</code>:
* <ol>
@@ -105,8 +65,11 @@
* header that value is returned.</li>
* <li>Otherwise the symbolic name is returned if set</li>
* <li>Otherwise the bundle's location is returned if defined</li>
- * <li>Finally, as a last ressort, the bundles id is returned</li>
+ * <li>Finally, as a last resort, the bundles id is returned</li>
* </ol>
+ *
+ * @param bundle the bundle which name to retrieve
+ * @return the bundle name - see the description of the method for more details.
*/
public static String getName( Bundle bundle )
{
@@ -129,6 +92,10 @@
/**
* Returns the value of the header or the empty string if the header
* is not available.
+ *
+ * @param bundle the bundle which header to retrieve
+ * @param headerName the name of the header to retrieve
+ * @return the header or empty string if it is not set
*/
public static String getHeaderValue( Bundle bundle, String headerName )
{
@@ -145,6 +112,8 @@
* always place as the first entry. If two bundles have the same name, they
* are ordered according to their version. If they have the same version,
* the bundle with the lower bundle id comes before the other.
+ *
+ * @param bundles the bundles to sort
*/
public static void sort( Bundle[] bundles )
{
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
index e3c295d..3f841d1 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/WebConsolePluginAdapter.java
@@ -29,7 +29,6 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.apache.felix.webconsole.VariableResolver;
import org.apache.felix.webconsole.WebConsoleConstants;
import org.osgi.framework.ServiceReference;
@@ -58,10 +57,14 @@
// the CSS references (null if none)
private final String[] cssReferences;
- // the delegatee variable resolver
- private VariableResolver varResolver;
-
-
+ /**
+ * Creates a new wrapper for a Web Console Plugin
+ *
+ * @param label the label
+ * @param title the title
+ * @param plugin the plugin itself
+ * @param serviceReference reference to the plugin
+ */
public WebConsolePluginAdapter( String label, String title, Servlet plugin, ServiceReference serviceReference )
{
this.label = label;
@@ -78,6 +81,8 @@
/**
* Returns the label of this plugin page as defined in the constructor.
+ *
+ * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#getLabel()
*/
public String getLabel()
{
@@ -87,6 +92,8 @@
/**
* Returns the title of this plugin page as defined in the constructor.
+ *
+ * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#getTitle()
*/
public String getTitle()
{
@@ -98,6 +105,8 @@
* Returns the CSS references from the
* {@link WebConsoleConstants#PLUGIN_CSS_REFERENCES felix.webconsole.css}
* service registration property of the plugin.
+ *
+ * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#getCssReferences()
*/
protected String[] getCssReferences()
{
@@ -108,6 +117,8 @@
/**
* Call the plugin servlet's service method to render the content of this
* page.
+ *
+ * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
protected void renderContent( HttpServletRequest req, HttpServletResponse res ) throws ServletException,
IOException
@@ -120,6 +131,8 @@
* Returns the registered plugin class to be able to call the
* <code>getResource()</code> method on that object for this plugin to
* provide additional resources.
+ *
+ * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#getResourceProvider()
*/
protected Object getResourceProvider()
{
@@ -131,6 +144,8 @@
/**
* Initializes this servlet as well as the plugin servlet.
+ *
+ * @see javax.servlet.GenericServlet#init(javax.servlet.ServletConfig)
*/
public void init( ServletConfig config ) throws ServletException
{
@@ -166,6 +181,8 @@
* {@link #renderContent(HttpServletRequest, HttpServletResponse)}
* method is called without any decorations and without setting any
* response headers.
+ *
+ * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#isHtmlRequest(javax.servlet.http.HttpServletRequest)
*/
protected boolean isHtmlRequest( final HttpServletRequest request )
{
@@ -179,6 +196,8 @@
* until the abstract web console plugin calls the
* {@link #renderContent(HttpServletRequest, HttpServletResponse)}
* method.
+ *
+ * @see javax.servlet.http.HttpServlet#service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
*/
public void service( ServletRequest req, ServletResponse resp ) throws ServletException, IOException
{
@@ -197,6 +216,8 @@
/**
* Destroys this servlet as well as the plugin servlet.
+ *
+ * @see javax.servlet.GenericServlet#destroy()
*/
public void destroy()
{
@@ -207,7 +228,6 @@
}
finally
{
- varResolver = null;
deactivate();
}
}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
index 8aa7400..9ad6332 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
@@ -36,15 +36,24 @@
import org.osgi.service.component.ComponentConstants;
+/**
+ * ComponentConfigurationPrinter prints the available SCR services.
+ */
public class ComponentConfigurationPrinter extends AbstractConfigurationPrinter
{
+ /**
+ * @see org.apache.felix.webconsole.ConfigurationPrinter#getTitle()
+ */
public String getTitle()
{
return "Declarative Services Components";
}
+ /**
+ * @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
+ */
public void printConfiguration( PrintWriter pw )
{
ServiceReference sr = getBundleContext().getServiceReference( "org.apache.felix.scr.ScrService" );
@@ -67,7 +76,7 @@
}
- public void printComponents( final PrintWriter pw, final Component[] components )
+ private static final void printComponents( final PrintWriter pw, final Component[] components )
{
if ( components == null || components.length == 0 )
{
@@ -93,7 +102,7 @@
}
- private void component( PrintWriter pw, Component component )
+ private static final void component( PrintWriter pw, Component component )
{
pw.print( component.getId() );
@@ -115,7 +124,7 @@
}
- private void listServices( PrintWriter pw, Component component )
+ private static void listServices( PrintWriter pw, Component component )
{
String[] services = component.getServices();
if ( services == null )
@@ -139,7 +148,7 @@
}
- private void listReferences( PrintWriter pw, Component component )
+ private static final void listReferences( PrintWriter pw, Component component )
{
Reference[] refs = component.getReferences();
if ( refs != null )
@@ -197,7 +206,7 @@
}
- private void listProperties( PrintWriter pw, Component component )
+ private static final void listProperties( PrintWriter pw, Component component )
{
Dictionary props = component.getProperties();
if ( props != null )
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
index 98fc1e1..05acf2e 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigurationAdminConfigurationPrinter.java
@@ -33,18 +33,28 @@
import org.osgi.service.cm.ConfigurationAdmin;
+/**
+ * ConfigurationAdminConfigurationPrinter uses the {@link ConfigurationAdmin} service
+ * to print the available configurations.
+ */
public class ConfigurationAdminConfigurationPrinter extends AbstractConfigurationPrinter
{
- public static final String TITLE = "Configurations";
+ private static final String TITLE = "Configurations";
+ /**
+ * @see org.apache.felix.webconsole.ConfigurationPrinter#getTitle()
+ */
public String getTitle()
{
return TITLE;
}
+ /**
+ * @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
+ */
public void printConfiguration( PrintWriter pw )
{
ServiceReference sr = getBundleContext().getServiceReference( ConfigurationAdmin.class.getName() );
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java
index e6a7d88..1898041 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/PreferencesConfigurationPrinter.java
@@ -27,18 +27,28 @@
import org.osgi.service.prefs.PreferencesService;
+/**
+ * PreferencesConfigurationPrinter uses the {@link Preferences} service
+ * to print the store bundle preferences.
+ */
public class PreferencesConfigurationPrinter extends AbstractConfigurationPrinter
{
- public static final String TITLE = "Preferences";
+ private static final String TITLE = "Preferences";
+ /**
+ * @see org.apache.felix.webconsole.ConfigurationPrinter#getTitle()
+ */
public String getTitle()
{
return TITLE;
}
+ /**
+ * @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
+ */
public void printConfiguration( PrintWriter printWriter )
{
ServiceReference sr = getBundleContext().getServiceReference( PreferencesService.class.getName() );
@@ -51,13 +61,13 @@
PreferencesService ps = ( PreferencesService ) getBundleContext().getService( sr );
try
{
- this.printPreferences( printWriter, ps.getSystemPreferences() );
+ printPreferences( printWriter, ps.getSystemPreferences() );
String[] users = ps.getUsers();
for ( int i = 0; users != null && i < users.length; i++ )
{
printWriter.println( "*** User Preferences " + users[i] + ":" );
- this.printPreferences( printWriter, ps.getUserPreferences( users[i] ) );
+ printPreferences( printWriter, ps.getUserPreferences( users[i] ) );
}
}
catch ( BackingStoreException bse )
@@ -72,7 +82,7 @@
}
- private void printPreferences( PrintWriter pw, Preferences prefs ) throws BackingStoreException
+ private static final void printPreferences( PrintWriter pw, Preferences prefs ) throws BackingStoreException
{
final String[] children = prefs.childrenNames();
@@ -86,7 +96,7 @@
{
for ( int i = 0; i < children.length; i++ )
{
- this.printPreferences( pw, prefs.node( children[i] ) );
+ printPreferences( pw, prefs.node( children[i] ) );
}
for ( int i = 0; i < keys.length; i++ )
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/filter/FilteringResponseWrapper.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/filter/FilteringResponseWrapper.java
index 5320f0c..02880a6 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/filter/FilteringResponseWrapper.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/filter/FilteringResponseWrapper.java
@@ -57,6 +57,10 @@
/**
* Creates a wrapper instance using the given resource bundle for
* translations.
+ *
+ * @param response the response to wrap
+ * @param locale a resource bundle, that will be used for translation of the strings
+ * @param request the original request - used to obtain the variable resolver
*/
public FilteringResponseWrapper( final HttpServletResponse response, final ResourceBundle locale,
final ServletRequest request )
@@ -72,6 +76,8 @@
* is being generated a filtering writer is returned which translates
* strings enclosed in <code>${}</code> according to the resource bundle
* configured for this response.
+ *
+ * @see javax.servlet.ServletResponseWrapper#getWriter()
*/
public PrintWriter getWriter() throws IOException
{
@@ -94,7 +100,7 @@
}
- private boolean doWrap()
+ private final boolean doWrap()
{
boolean doWrap = getContentType() != null && getContentType().indexOf( "text/html" ) >= 0;
return doWrap;
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java
index 289890f..03c9e70 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/i18n/ResourceBundleManager.java
@@ -30,6 +30,11 @@
import org.osgi.framework.BundleListener;
+/**
+ * The ResourceBundleManager manages resource bundle instance per OSGi Bundle.
+ * It contains a local cache, for bundles, but when a bundle is being unistalled,
+ * its resources stored in the cache are cleaned up.
+ */
public class ResourceBundleManager implements BundleListener
{
@@ -40,6 +45,11 @@
private final Map resourceBundleCaches;
+ /**
+ * Creates a new object and adds self as a bundle listener
+ *
+ * @param bundleContext the bundle context of the Web Console.
+ */
public ResourceBundleManager( final BundleContext bundleContext )
{
this.bundleContext = bundleContext;
@@ -50,12 +60,24 @@
}
+ /**
+ * Removes the bundle lister.
+ */
public void dispose()
{
bundleContext.removeBundleListener( this );
}
+ /**
+ * This method is used to retrieve a /cached/ instance of the i18n resource associated
+ * with a given bundle.
+ *
+ * @param provider the bundle, provider of the resources
+ * @param locale the requested locale.
+ * @return the resource bundle - if not bundle with the requested locale exists,
+ * the default locale is used.
+ */
public ResourceBundle getResourceBundle( final Bundle provider, final Locale locale )
{
// check whether we have to return the resource bundle for the
@@ -85,7 +107,10 @@
// ---------- BundleListener
- public void bundleChanged( BundleEvent event )
+ /**
+ * @see org.osgi.framework.BundleListener#bundleChanged(org.osgi.framework.BundleEvent)
+ */
+ public final void bundleChanged( BundleEvent event )
{
if ( event.getType() == BundleEvent.STOPPED )
{
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
index caec864..6c99f7e 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
@@ -32,7 +32,6 @@
import org.apache.commons.io.IOUtils;
import org.apache.felix.webconsole.*;
import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
-import org.apache.felix.webconsole.internal.Util;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
@@ -176,9 +175,11 @@
//ConfigurationWriter pw = new HtmlConfigurationWriter( response.getWriter() );
PrintWriter pw = response.getWriter();
- Util.startScript(pw);
+ pw.println( "<script type='text/javascript'>" );
+ pw.println( "// <![CDATA[" );
pw.println("$(document).ready(function() {$('#tabs').tabs()} );");
- Util.endScript(pw);
+ pw.println( "// ]]>" );
+ pw.println( "</script>" );
pw.println("<br/><p class=\"statline\">");
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/DeployerThread.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/DeployerThread.java
index 8753427..d2a0315 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/DeployerThread.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/DeployerThread.java
@@ -72,8 +72,7 @@
}
catch ( Exception ie )
{
- Throwable cause = ( ie.getCause() != null ) ? ie.getCause() : ie;
- logger.log( LogService.LOG_ERROR, "Cannot install bundles", cause );
+ logger.log( LogService.LOG_ERROR, "Cannot install bundles", ie );
}
}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java
index 78b0506..65f9441 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationListener2.java
@@ -34,7 +34,7 @@
class ConfigurationListener2 extends ConfigurationListener implements MetaTypeProvider
{
- private final String pid;
+ final String pid; // reduces visibility because access to this was made though synthetic accessor method
private ObjectClassDefinition ocd;