Project

General

Profile

« Previous | Next » 

Revision 7022

Get ReplicationPolicy correctly generated:
-tweak the regular expression for getting the pref/blocked node list for default replication policy.
-set blocked list (had mistakenly been two calls to set pref list)

View differences:

src/edu/ucsb/nceas/metacat/dataone/SystemMetadataFactory.java
714 714
                if (blockedNodeList != null) {
715 715
                    List<NodeReference> bNodes = extractNodeReferences(blockedNodeList);
716 716
                    if (bNodes != null && !bNodes.isEmpty()) {
717
                        rp.setPreferredMemberNodeList(bNodes);
717
                        rp.setBlockedMemberNodeList(bNodes);
718 718
                    }
719 719
                }
720 720
            } catch (PropertyNotFoundException e) {
......
732 732
     */
733 733
    private static List<NodeReference> extractNodeReferences(String nodeString) {
734 734
        List<NodeReference> nodeList = new ArrayList<NodeReference>();
735
        String[] result = nodeString.split("[,;\\s]*");
735
        String[] result = nodeString.split("[,;\\s]");
736 736
        for (String r : result) {
737 737
            NodeReference noderef = new NodeReference();
738 738
            noderef.setValue(r);

Also available in: Unified diff