Fixed major issues reported by sonar (Performance - Method invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-03-09 22:28:52 +00:00
parent 91a5d0e502
commit 1db449f921
2 changed files with 5 additions and 5 deletions

View File

@@ -652,7 +652,7 @@ public class FilePlanRoleServiceImpl implements FilePlanRoleService,
String zone = getZoneName(rmRootNode);
Set<String> roles = authorityService.getAllAuthoritiesInZone(zone, AuthorityType.GROUP);
return new Boolean(roles.contains(fullRoleName));
return Boolean.valueOf(roles.contains(fullRoleName));
}
}, AuthenticationUtil.getSystemUserName()).booleanValue();
}

View File

@@ -33,7 +33,7 @@ public class DataSetsGet extends DeclarativeWebScript
/**
* Set data set service
*
*
* @param dataSetService the data set service
*/
public void setDataSetService(DataSetService dataSetService)
@@ -43,7 +43,7 @@ public class DataSetsGet extends DeclarativeWebScript
/**
* Set site service
*
*
* @param siteService the site service
*/
public void setSiteService(SiteService siteService)
@@ -72,10 +72,10 @@ public class DataSetsGet extends DeclarativeWebScript
boolean unloadedOnly = false;
if (StringUtils.isNotBlank(unloadedOnlyParam))
{
unloadedOnly = new Boolean(unloadedOnlyParam).booleanValue();
unloadedOnly = Boolean.valueOf(unloadedOnlyParam).booleanValue();
}
// Get the loaded/unloaded data sets depending on the "unloadedOnly" parameter
// Get the loaded/unloaded data sets depending on the "unloadedOnly" parameter
Map<String, DataSet> dataSets = dataSetService.getDataSets(filePlan, unloadedOnly);
List<Map<String, String>> dataSetList = new ArrayList<Map<String, String>>(dataSets.size());