Fixed failing ChannelServiceImpl.testUpdateChannel.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28976 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-13 12:02:54 +00:00
parent 9534fcf21e
commit 7392670c01

View File

@@ -382,6 +382,8 @@ public class ChannelServiceImpl implements ChannelService
@Override @Override
public void updateChannel(Channel channel, Map<QName, Serializable> properties) public void updateChannel(Channel channel, Map<QName, Serializable> properties)
{ {
HashMap<QName, Serializable> actualProps = new HashMap<QName, Serializable>(properties);
actualProps.remove(ContentModel.PROP_NODE_UUID);
List<NodeRef> allChannelNodes = new ArrayList<NodeRef>(); List<NodeRef> allChannelNodes = new ArrayList<NodeRef>();
NodeRef editorialNode = channel.getNodeRef(); NodeRef editorialNode = channel.getNodeRef();
allChannelNodes.add(editorialNode); allChannelNodes.add(editorialNode);
@@ -391,7 +393,7 @@ public class ChannelServiceImpl implements ChannelService
} }
for (NodeRef channelNode : allChannelNodes) for (NodeRef channelNode : allChannelNodes)
{ {
for (Map.Entry<QName, Serializable> entry : properties.entrySet()) for (Map.Entry<QName, Serializable> entry : actualProps.entrySet())
{ {
nodeService.setProperty(channelNode, entry.getKey(), entry.getValue()); nodeService.setProperty(channelNode, entry.getKey(), entry.getValue());
} }