Fixed critical bugs (Security - Array is stored directly) reported in Sonar

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@73860 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-06-15 11:39:53 +00:00
parent f9cdbe795f
commit 114c198b44
3 changed files with 13 additions and 13 deletions

View File

@@ -21,12 +21,12 @@ package org.alfresco.module.org_alfresco_module_rm.caveat;
import java.util.Arrays;
public class RMConstraintInfo
{
{
private String name;
private String title;
private boolean caseSensitive;
private String[] allowedValues;
public void setName(String name)
{
this.name = name;
@@ -53,13 +53,13 @@ public class RMConstraintInfo
}
public void setAllowedValues(String[] values)
{
this.allowedValues = values;
this.allowedValues = values.clone();
}
public String[] getAllowedValues()
{
return allowedValues;
}
@Override
public String toString()
{
@@ -75,5 +75,5 @@ public class RMConstraintInfo
builder.append("]");
return builder.toString();
}
}

View File

@@ -26,7 +26,7 @@ public class ScriptCapability
private String name;
private String displayLabel;
private String[] actions;
/**
* @param name
* @param displayLabel
@@ -36,7 +36,7 @@ public class ScriptCapability
{
this.name = name;
this.displayLabel = displayLabel;
this.actions = actions;
this.actions = actions.clone();
}
/**
@@ -46,7 +46,7 @@ public class ScriptCapability
{
return name;
}
/**
* @return the displayLabel
*/
@@ -54,7 +54,7 @@ public class ScriptCapability
{
return displayLabel;
}
/**
* @return the actions
*/

View File

@@ -83,7 +83,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
{
this.namespaceService = namespaceService;
}
/**
* @param filePlanService file plan service
*/
@@ -101,7 +101,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
Map<String, Object> model = new HashMap<String, Object>(13);
List<Group> groups = new ArrayList<Group>(5);
// get the file plan
// TODO the file plan should be passed to this web script
NodeRef filePlan = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
@@ -121,7 +121,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
}
AspectDefinition aspectDefinition = dictionaryService.getAspect(aspect);
Group group = new Group(aspect.getLocalName(), aspectDefinition.getTitle(dictionaryService), propObjs);
Group group = new Group(aspect.getLocalName(), aspectDefinition.getTitle(dictionaryService), propObjs);
groups.add(group);
}
@@ -152,7 +152,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
{
this.id = id;
this.label = label;
this.properties = properties;
this.properties = properties.clone();
}
public String getId()