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

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


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94547 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 09:48:27 +00:00
parent 3458af98f2
commit 510abf138f
2 changed files with 10 additions and 1 deletions

View File

@@ -561,8 +561,16 @@ public class AuditComponentImpl implements AuditComponent
trimStringsIfNecessary(auditValue); trimStringsIfNecessary(auditValue);
} }
} }
try
{
collection.addAll(strings); collection.addAll(strings);
} }
catch (UnsupportedOperationException e)
{
// nothing to do in the case of unmodifiable collection
}
}
} }
@Override @Override

View File

@@ -1005,6 +1005,7 @@ public class AuditComponentTest extends TestCase
values.put("/3.1/4.2", mlTextValue); values.put("/3.1/4.2", mlTextValue);
values.put("map", map); values.put("map", map);
values.put("collection", list); values.put("collection", list);
values.put("unmodifiableCollection", (Serializable) Collections.unmodifiableCollection(list));
auditComponent.recordAuditValues("/test/one.one/two.one", values); auditComponent.recordAuditValues("/test/one.one/two.one", values);