[
https://issues.apache.org/jira/browse/FELIX-4074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13666326#comment-13666326
]
Carsten Ziegeler commented on FELIX-4074:
-----------------------------------------
Suggest patch: the patch simply checks whether the old class was in the list of
enabled plugins and replaces it with the new class.
Index:
src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
===================================================================
--- src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
(revision 1486055)
+++ src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
(working copy)
@@ -171,6 +171,9 @@
*/
static final String DEFAULT_MANAGER_ROOT = "/system/console"; //$NON-NLS-1$
+ private static final String OLD_CONFIG_MANAGER_CLASS =
"org.apache.felix.webconsole.internal.compendium.ConfigManager"; //$NON-NLS-1$
+ private static final String NEW_CONFIG_MANAGER_CLASS =
"org.apache.felix.webconsole.internal.configuration.ConfigManager";
//$NON-NLS-1$
+
static final String[] PLUGIN_CLASSES = {
"org.apache.felix.webconsole.internal.configuration.ConfigurationAdminConfigurationPrinter",
//$NON-NLS-1$
"org.apache.felix.webconsole.internal.compendium.PreferencesConfigurationPrinter",
//$NON-NLS-1$
@@ -182,7 +185,7 @@
"org.apache.felix.webconsole.internal.misc.ThreadPrinter", };
//$NON-NLS-1$
static final String[] PLUGIN_MAP = {
-
"org.apache.felix.webconsole.internal.configuration.ConfigManager",
"configMgr", //$NON-NLS-1$ //$NON-NLS-2$
+ NEW_CONFIG_MANAGER_CLASS, "configMgr", //$NON-NLS-1$ //$NON-NLS-2$
"org.apache.felix.webconsole.internal.compendium.LogServlet",
"logs", //$NON-NLS-1$ //$NON-NLS-2$
"org.apache.felix.webconsole.internal.core.BundlesServlet",
"bundles", //$NON-NLS-1$ //$NON-NLS-2$
"org.apache.felix.webconsole.internal.core.ServicesServlet",
"services", //$NON-NLS-1$ //$NON-NLS-2$
@@ -963,6 +966,14 @@
// get enabled plugins
String[] plugins = ConfigurationUtil.getStringArrayProperty(config,
PROP_ENABLED_PLUGINS);
enabledPlugins = null == plugins ? null : new
HashSet(Arrays.asList(plugins));
+ // check for moved config manager class
+ if ( enabledPlugins != null )
+ {
+ if ( enabledPlugins.remove(OLD_CONFIG_MANAGER_CLASS) )
+ {
+ enabledPlugins.add(NEW_CONFIG_MANAGER_CLASS);
+ }
+ }
initInternalPlugins();
// might update HTTP service registration
> Plugin class name changed for config manager plugin, might be disabled on
> update
> --------------------------------------------------------------------------------
>
> Key: FELIX-4074
> URL: https://issues.apache.org/jira/browse/FELIX-4074
> Project: Felix
> Issue Type: Bug
> Components: Web Console
> Affects Versions: webconsole-4.0.0
> Reporter: Carsten Ziegeler
> Fix For: webconsole-4.2.0
>
>
> The class of the config manager plugin changed from
> org.apache.felix.webconsole.internal.compendium.ConfigManager
> to
> org.apache.felix.webconsole.internal.configuration.ConfigManager
> while this is an implementation detail, it is unfortunately also used to
> disable plugins through a configuration for the OsgiManager.
> If now a configuration is available for the OSGiManager which lists enabled
> plugins including the old class name, updating the web console will lead to
> disabling the config manager plugin
> Easiest fix would be to revert the name change
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira