Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.0/Cloud)

87705: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      86681: MNT-12196 : Exception generated in “AccessAuditor” when length of custom property string in Javascript is bigger than 1024 in Postgres database
         - Fixed build failure


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94544 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 09:47:55 +00:00
parent c93ae4a719
commit 6be27f8033

View File

@@ -529,6 +529,7 @@ public class AuditComponentImpl implements AuditComponent
{
Collection<Object> collection = (Collection<Object>) values;
Iterator<Object> iterator = collection.iterator();
Set<String> strings = new HashSet<String>();
while (iterator.hasNext())
{
Object auditValue = iterator.next();
@@ -542,8 +543,8 @@ public class AuditComponentImpl implements AuditComponent
String trimmed = SchemaBootstrap.trimStringForTextFields((String) auditValue);
if (!trimmed.equals(auditValue))
{
collection.remove(auditValue);
collection.add(trimmed);
strings.add(trimmed);
iterator.remove();
}
}
else if (auditValue instanceof MLText)
@@ -560,6 +561,7 @@ public class AuditComponentImpl implements AuditComponent
trimStringsIfNecessary(auditValue);
}
}
collection.addAll(strings);
}
}