From 6be27f8033d971803441a5737e505c41c3066f2d Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Sat, 31 Jan 2015 09:47:55 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20HEAD-BUG-FIX=20(5.1/Cloud)=20to=20HEAD?= =?UTF-8?q?=20(5.0/Cloud)=20=20=20=2087705:=20Merged=20V4.2-BUG-FIX=20(4.2?= =?UTF-8?q?.4)=20to=20HEAD-BUG-FIX=20(5.0/Cloud)=20=20=20=20=20=20=2086681?= =?UTF-8?q?:=20MNT-12196=20:=20Exception=20generated=20in=20=E2=80=9CAcces?= =?UTF-8?q?sAuditor=E2=80=9D=20when=20length=20of=20custom=20property=20st?= =?UTF-8?q?ring=20in=20Javascript=20is=20bigger=20than=201024=20in=20Postg?= =?UTF-8?q?res=20database=20=20=20=20=20=20=20=20=20=20-=20Fixed=20build?= =?UTF-8?q?=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94544 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- source/java/org/alfresco/repo/audit/AuditComponentImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/audit/AuditComponentImpl.java b/source/java/org/alfresco/repo/audit/AuditComponentImpl.java index 409f7a7ea6..1758a8701b 100644 --- a/source/java/org/alfresco/repo/audit/AuditComponentImpl.java +++ b/source/java/org/alfresco/repo/audit/AuditComponentImpl.java @@ -529,6 +529,7 @@ public class AuditComponentImpl implements AuditComponent { Collection collection = (Collection) values; Iterator iterator = collection.iterator(); + Set strings = new HashSet(); 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); } }