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); String zone = getZoneName(rmRootNode);
Set<String> roles = authorityService.getAllAuthoritiesInZone(zone, AuthorityType.GROUP); Set<String> roles = authorityService.getAllAuthoritiesInZone(zone, AuthorityType.GROUP);
return new Boolean(roles.contains(fullRoleName)); return Boolean.valueOf(roles.contains(fullRoleName));
} }
}, AuthenticationUtil.getSystemUserName()).booleanValue(); }, AuthenticationUtil.getSystemUserName()).booleanValue();
} }

View File

@@ -72,7 +72,7 @@ public class DataSetsGet extends DeclarativeWebScript
boolean unloadedOnly = false; boolean unloadedOnly = false;
if (StringUtils.isNotBlank(unloadedOnlyParam)) 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