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

65422: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (4.3/Cloud)
      65044: Merged DEV to V4.2-BUG-FIX (4.2.2)
         65027 : MNT-10969 : FormService doesn't allow empty value in multivalued field
            - Multivalue properties may now contain empty values.
            - Unit test added.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@66234 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-04-02 21:07:09 +00:00
parent 277a442fe0
commit f1a304506a
2 changed files with 42 additions and 7 deletions

View File

@@ -29,11 +29,11 @@ import static org.alfresco.repo.forms.processor.node.FormFieldConstants.PROP_DAT
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -360,12 +360,7 @@ public abstract class ContentModelFormProcessor<ItemType, PersistType> extends
{
// if value is a String convert to List of
// String
StringTokenizer tokenizer = new StringTokenizer((String) value, ",");
List<String> list = new ArrayList<String>(8);
while (tokenizer.hasMoreTokens())
{
list.add(tokenizer.nextToken());
}
List<String> list = Arrays.asList(((String)value).split(",", -1));
// persist the List
value = list;