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

96980: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud)
      96874: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2)
         96701: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.5)
            96519: Merged DEV (4.1.10) to V4.1-BUG-FIX (4.1.10)
               80890: MNT-12155 : Attempt to create a new rule or view existing rules fails with TypeError: Cannot find default value for object
               Added special handling of properties with a dot in the name.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@96997 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-02-13 09:51:12 +00:00
parent 3604b20ffb
commit 33528c5045

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -75,7 +75,18 @@ public class ScriptPreferenceService extends BaseScopableProcessorExtension
for (Map.Entry<String, Serializable> entry : prefs.entrySet())
{
String[] keys = entry.getKey().replace(".", "+").split("\\+");
String key = entry.getKey();
String[] keys;
int colonIndex = key.indexOf(":");
if (colonIndex > -1)
{
keys = key.substring(0, colonIndex).replace(".", "+").split("\\+");
keys[keys.length - 1] = keys[keys.length - 1].concat(key.substring(colonIndex));
}
else
{
keys = key.replace(".", "+").split("\\+");
}
setPrefValue(keys, entry.getValue(), result);
}