Details
-
Bug
-
Resolution: Fixed
-
Medium
-
6.2
-
6.02
-
Description
Hi All,
I am experiencing an strange issue with my Minyaa plugins against JIRA 6.2.x and 6.3.x.
I have just delivered after a large delay the 1st version compatible with 6.3 to 6.3.5 (not yet over )
Among these plugins, I have always some V1 plugins (Be sure that I do my best to try their migration in V2 ... It is not the subject of this issue).
Today, I have started to complete the migration for 6.3.6 to 6.3.8, and during some tests, I need to disable one of my plugin v1, and surprise I was not able to do it, since JIRA Plugin Manager raise the error "org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate for 'xxxx'".
Since I did many change for this last version and mainly in pom.xml due to a newer Atlassian SDK, I have some suspiscion about some settings.
But I have finally made some tests wigth older versions ... It appears that I was not able to disable plugin V1 since JIRA 6.2.
I made some search in source code and found this ....
Before 6.2, the method ComponentModuleDescriptor.unregisterComponents() was :
public void unregisterComponents(final MutablePicoContainer container) { // Check that we have classloaded the interface if required. if (interfaceClazzName != null && interfaceClazz == null) { throw new PluginException("Cannot unregister component '" + interfaceClazzName + "' in plugin '" + getKey() + "' because we haven't loaded the class. This means that this plugin has not been successfully enabled."); } if (container.getComponentAdapter(interfaceClazz) != null) { container.unregisterComponent(interfaceClazz); } // TODO: Should this be in an else clause? It is probably harmless, but also pointless. container.unregisterComponent(getModuleClass()); }
Since 6.2, the method ComponentModuleDescriptor.unregisterComponents() is now :
public void unregisterComponents(final MutablePicoContainer container) { // Check that we have classloaded the interface if required. if (interfaceClazzName != null && interfaceClazz == null) { throw new PluginException("Cannot unregister component '" + interfaceClazzName + "' in plugin '" + getKey() + "' because we haven't loaded the class. This means that this plugin has not been successfully enabled."); } if (container.getComponentAdapter(interfaceClazz) != null) { container.removeComponent(interfaceClazz); } // TODO: Should this be in an else clause? It is probably harmless, but also pointless. container.addComponent(getModuleClass()); }
I did not invest more about the cause of this change (probably due to some change the Container), but it is strange that the last lien :
container.unregisterComponent(getModuleClass());
is replaced by
container.addComponent(getModuleClass());
Let me know if it is clearly a Bug or I missed something ...
Regards
Vincent
PS: When the Wiki Rendered will be available in JSD ?
Attachments
Issue Links
- is duplicated by
-
JRASERVER-40530 Not able to disable a plugin V1
- Closed
- clones
-
REL-59 Loading...