From a7cefce58cdb0f7f2d0868a1d5ee2f24f3890646 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Mon, 22 Sep 2014 16:01:18 +0200 Subject: ItemPath.fromUUIDString unnecessary as ItemPath(String) supports both plain UUIDs and an /entity prefix. Tightened that up and removed the fromUUIDString method for a simpler API. Also switched AgentPath(String) to a path argument for consistency. New AgentPaths should be created with AgentPath(new ItemPath(), String) instead. --- src/main/java/com/c2kernel/entity/imports/ImportDependency.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/entity/imports/ImportDependency.java') diff --git a/src/main/java/com/c2kernel/entity/imports/ImportDependency.java b/src/main/java/com/c2kernel/entity/imports/ImportDependency.java index 87e6b11..3fafd6f 100644 --- a/src/main/java/com/c2kernel/entity/imports/ImportDependency.java +++ b/src/main/java/com/c2kernel/entity/imports/ImportDependency.java @@ -58,13 +58,11 @@ public class ImportDependency implements java.io.Serializable { for (ImportDependencyMember thisMem : dependencyMemberList) { ItemPath itemPath; try { - itemPath = ItemPath.fromUUIDString(thisMem.itemPath); + itemPath = new ItemPath(thisMem.itemPath); } catch (InvalidItemPathException ex) { itemPath = new DomainPath(thisMem.itemPath).getItemPath(); } - if (itemPath == null) - throw new MembershipException("Cannot find "+thisMem.itemPath+" specified for collection."); com.c2kernel.collection.DependencyMember newDepMem = newDep.addMember(itemPath); newDepMem.getProperties().putAll(thisMem.props); } -- cgit v1.2.3