Fixed critical issues reported by sonar (Performance - Inefficient use of keySet iterator instead of entrySet iterator)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@65396 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-03-22 15:56:17 +00:00
parent 935ca851cb
commit 166ece8ebb
9 changed files with 42 additions and 41 deletions

View File

@@ -265,15 +265,15 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
private boolean processPropertyDefinitions(Map<QName, PropertyDefinition> properties, String substitutionFragment, Set<String> suggestions)
{
boolean gotMaximumSuggestions = false;
if(properties != null)
if (properties != null)
{
for(QName key : properties.keySet())
for (Map.Entry<QName, PropertyDefinition> entry : properties.entrySet())
{
PropertyDefinition propertyDefinition = properties.get(key);
PropertyDefinition propertyDefinition = entry.getValue();
QName type = propertyDefinition.getDataType().getName();
if(ArrayUtils.contains(supportedDataTypes, type))
{
String suggestion = getName() + "." + key.getPrefixString();
String suggestion = getName() + "." + entry.getKey().getPrefixString();
if(suggestion.toLowerCase().contains(substitutionFragment))
{
if(suggestions.size() < this.maximumNumberSuggestions)