summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/entity/imports/ImportDependency.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-09-22 16:01:18 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-09-22 16:02:11 +0200
commita7cefce58cdb0f7f2d0868a1d5ee2f24f3890646 (patch)
tree89c30cdb92d7edae5d735c2d6ef45f890cc7be82 /src/main/java/com/c2kernel/entity/imports/ImportDependency.java
parentcfa70de9ec7745356ed00c1502d5bd55eee14181 (diff)
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.
Diffstat (limited to 'src/main/java/com/c2kernel/entity/imports/ImportDependency.java')
-rw-r--r--src/main/java/com/c2kernel/entity/imports/ImportDependency.java4
1 files changed, 1 insertions, 3 deletions
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);
}