Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Component Manager methods have disappeared without deprecation

Marina Ferraz McCashin February 5, 2018

I am currently trying to upgrade a jira plugin and have discovered that between JIRA 7.6.0 and Jira 7.6.1 the following two methods have disappeared with alternative or deprecation.

 

ComponentManager.getContainer()

ComponentManager.getMutablePicoContainer()

 

Can anyone provide me an alternative of how I can access this containers from the ComponentManager?

 

 

1 answer

1 accepted

1 vote
Answer accepted
Tarun Sapra
Community Champion
February 6, 2018

ComponentManager has long been deprecated. Please use ComponentAccessor

https://docs.atlassian.com/DAC/javadoc/jira/7.1.0-m01/reference/com/atlassian/jira/component/ComponentAccessor.html

From Docs

The ComponentManager also has various static accessor methods for non-Pico-managed objects, eg. ComponentManager.getInstance().getProjectManager(). Plugins developers should no longer use these - please use ComponentAccessor instead.

Matt Doar
Community Champion
February 6, 2018

Yes, but why would a deprecated APi be removed in a patch release? I thought the API was stable until release versions?

Matt Doar
Community Champion
February 6, 2018

See https://developer.atlassian.com/server/jira/platform/java-apis/

"For example, a method that is marked as deprecated in JIRA 6.1 will still work in JIRA 6.2, but will be deleted in JIRA 7.0"

Tarun Sapra
Community Champion
February 6, 2018

Indeed Matt, I just checked the 7.6.1 API and both methods getContainer and getMutablePicoContainer exist in ComponentManager

https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/ComponentManager.html

Marina Ferraz McCashin February 6, 2018

Apologies, you're right, the methods are there in 7.6.1 - however, they have subsequently disappeared in 7.7.0 which is what I'm trying to upgrade my plugin to. 

I'm with @[deleted] - they shouldn't have disappeared in a point release. 

I have no choice but to use the Component Accessor but a little more transparency would have been nice. 

Suggest an answer

Log in or Sign up to answer