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

87698: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      86372: Merged DEV to V4.2-BUG-FIX (4.2.4)
         86152 : MNT-12196 : Exception generated in “AccessAuditor” when length of custom property string in Javascript is bigger than 1024 in Postgres database
            - Added trimming audit values (String and MLText) to not exceed system.maximumStringLength
         86284 : MNT-12196 : Exception generated in “AccessAuditor” when length of custom property string in Javascript is bigger than 1024 in Postgres database
         86286 : MNT-12196 : Exception generated in “AccessAuditor” when length of custom property string in Javascript is bigger than 1024 in Postgres database
         86303 : MNT-12196 : Exception generated in “AccessAuditor” when length of custom property string in Javascript is bigger than 1024 in Postgres database
            - Add check for Map and Collection


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94537 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 09:46:35 +00:00
parent 36fdee5019
commit c93ae4a719
2 changed files with 89 additions and 20 deletions

View File

@@ -987,10 +987,24 @@ public class AuditComponentTest extends TestCase
MLText mlTextValue = new MLText();
mlTextValue.put(Locale.ENGLISH, sb.toString());
HashMap<String, Serializable> map = new HashMap<String, Serializable>();
map.put("String", sb.toString());
MLText mlTextValue1 = new MLText();
mlTextValue1.put(Locale.ENGLISH, sb.toString());
map.put("MLText", mlTextValue1);
ArrayList<Serializable> list = new ArrayList<Serializable>();
list.add(sb.toString());
MLText mlTextValue2 = new MLText();
mlTextValue2.put(Locale.ENGLISH, sb.toString());
list.add(mlTextValue2);
Map<String, Serializable> values = new HashMap<String, Serializable>(13);
values.put("/3.1/4.1", sb.toString());
values.put("/3.1/4.2", mlTextValue);
values.put("map", map);
values.put("collection", list);
auditComponent.recordAuditValues("/test/one.one/two.one", values);