mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix 6 instances of 'scary' findbugs issue: "Method creates local variable-based synchronized collection "
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@113198 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -374,7 +374,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
String displayPath = getDisplayPath(originatingLocation);
|
String displayPath = getDisplayPath(originatingLocation);
|
||||||
String[] displayPathElements = displayPath.split(pathSeparator);
|
String[] displayPathElements = displayPath.split(pathSeparator);
|
||||||
Object[] subPath = ArrayUtils.subarray(displayPathElements, 5, displayPathElements.length);
|
Object[] subPath = ArrayUtils.subarray(displayPathElements, 5, displayPathElements.length);
|
||||||
StringBuffer originatingLocationPath = new StringBuffer();
|
StringBuilder originatingLocationPath = new StringBuilder();
|
||||||
for (int i = 0; i < subPath.length; i++)
|
for (int i = 0; i < subPath.length; i++)
|
||||||
{
|
{
|
||||||
originatingLocationPath.append(pathSeparator).append(subPath[i]);
|
originatingLocationPath.append(pathSeparator).append(subPath[i]);
|
||||||
|
@@ -307,7 +307,7 @@ public class DeclarativeReportGenerator extends BaseReportGenerator
|
|||||||
String typePrefixName = reportType.getPrefixedQName(namespaceService).getPrefixString().replace(":", "_");
|
String typePrefixName = reportType.getPrefixedQName(namespaceService).getPrefixString().replace(":", "_");
|
||||||
String extension = mimetypeService.getExtension(mimetype);
|
String extension = mimetypeService.getExtension(mimetype);
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer(128)
|
StringBuilder sb = new StringBuilder(128)
|
||||||
.append("report_")
|
.append("report_")
|
||||||
.append(typePrefixName)
|
.append(typePrefixName)
|
||||||
.append(".")
|
.append(".")
|
||||||
|
@@ -153,7 +153,7 @@ public class RmActionPost extends DeclarativeWebScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check that all the nodes provided exist and build report string
|
// Check that all the nodes provided exist and build report string
|
||||||
StringBuffer targetNodeRefsString = new StringBuffer(30);
|
StringBuilder targetNodeRefsString = new StringBuilder(30);
|
||||||
boolean firstTime = true;
|
boolean firstTime = true;
|
||||||
for (NodeRef targetNodeRef : targetNodeRefs)
|
for (NodeRef targetNodeRef : targetNodeRefs)
|
||||||
{
|
{
|
||||||
|
@@ -334,7 +334,7 @@ public class RMSearchGet extends DeclarativeWebScript
|
|||||||
NodeRef person = personService.getPerson(userName);
|
NodeRef person = personService.getPerson(userName);
|
||||||
if (person != null)
|
if (person != null)
|
||||||
{
|
{
|
||||||
StringBuffer displayName = new StringBuffer(128);
|
StringBuilder displayName = new StringBuilder(128);
|
||||||
displayName.append(nodeService.getProperty(person, ContentModel.PROP_FIRSTNAME))
|
displayName.append(nodeService.getProperty(person, ContentModel.PROP_FIRSTNAME))
|
||||||
.append(" ")
|
.append(" ")
|
||||||
.append(nodeService.getProperty(person, ContentModel.PROP_LASTNAME));
|
.append(nodeService.getProperty(person, ContentModel.PROP_LASTNAME));
|
||||||
|
@@ -200,7 +200,7 @@ public class RMMethodSecurityInterceptor extends MethodSecurityInterceptor
|
|||||||
|
|
||||||
if (!capabilities.isEmpty())
|
if (!capabilities.isEmpty())
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer("\n");
|
StringBuilder buffer = new StringBuilder("\n");
|
||||||
for (CapabilityReport capability : capabilities)
|
for (CapabilityReport capability : capabilities)
|
||||||
{
|
{
|
||||||
buffer.append(" ").append(capability.name).append(" (").append(capability.status).append(")\n");
|
buffer.append(" ").append(capability.name).append(" (").append(capability.status).append(")\n");
|
||||||
|
@@ -189,7 +189,7 @@ public class RMMethodSecurityPostProcessor implements BeanFactoryPostProcessor
|
|||||||
*/
|
*/
|
||||||
private String convertToString(Map<String, String> map)
|
private String convertToString(Map<String, String> map)
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer(256);
|
StringBuilder buffer = new StringBuilder(256);
|
||||||
for (Map.Entry<String, String> entry : map.entrySet())
|
for (Map.Entry<String, String> entry : map.entrySet())
|
||||||
{
|
{
|
||||||
buffer.append(entry.getKey()).append("=").append(entry.getValue()).append("\n");
|
buffer.append(entry.getKey()).append("=").append(entry.getValue()).append("\n");
|
||||||
|
Reference in New Issue
Block a user