Hi,
we are using "com.atlassian.jira.util.map.EasyMap" in our plugins developed for Jira 4.4.5 for the purpose like to get ChangeItems etc .. see below code ,..
We are planning to upgrade our Jira to 5.1.7 and I did not find "com.atlassian.jira.util.map.EasyMap" in jira 5.1.7.
So Can any one please suggest the alternative class to this
in
Jira 5.1.7, (Or) please share
if
any alternative ways to achive the same
in
Jira 5.1.7.
Map params = EasyMap.build("issue", issue.getLong("id")); List<GenericValue> changeGroups = delegator.findByAnd("ChangeGroup", params);
Map paramsItem = EasyMap.build("group", changeGroup.getLong("id"),"field", "status","fieldtype", "jira"); List<GenericValue> changeItems = delegator.findByAnd("ChangeItem", paramsItem);
Community moderators have prevented the ability to post new answers.
Use MapBuilder. EasyMap is deprecated.
I'd agree using deprecated stuff should be avoided, however, I think you may be mistaken this time:
EasyMap was deprecated in its original 3.13 - 4.0 package, it has since been moved to a different package in JIRA 5 and is no longer deprecated.
Sometimes, retaining them allows wider version compatibility. That it is deprecated is an indicator it will go away in future, testing will of course pick that up rather quickly. Finding alternatives can be a challenge, something the existing Javadoc does not do nothing more than @deprecated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see. However, using core package itself is not recommended ;) I still recommend to use MapBuilder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jobin, but when i use MapBuilder, i found there is no Map build(Object... objects) as EasyMap, it's not convenient for me to use that when i have many key-value parameter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Just interesting why time to time in the some place (in the source of product) we meet with easyMap, when can be used guava?
Also, this one shows refactoring
https://jira.atlassian.com/browse/CWD-3098
Cheers,
Gonchik Tsymzhitov
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
EasyMap is still there,
com/atlassian/core/util/map/EasyMap.java
Try importing jira-core, I can't quite see where the dependency comes in but I have jira-api and jira-core, EasyMap is visible to me?
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-core</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
atlassian-jira/WEB-INF/lib/atlassian-core-4.6.2.jar ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.