From b68ea0f2b12c4c5189c5fc7c182a1b242dc63579 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 3 Oct 2014 23:18:47 +0200 Subject: Rolled back the renaming of existing exceptions. --- src/main/java/com/c2kernel/collection/Dependency.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/c2kernel/collection/Dependency.java') diff --git a/src/main/java/com/c2kernel/collection/Dependency.java b/src/main/java/com/c2kernel/collection/Dependency.java index cfcb4f7..1dd777c 100644 --- a/src/main/java/com/c2kernel/collection/Dependency.java +++ b/src/main/java/com/c2kernel/collection/Dependency.java @@ -22,8 +22,8 @@ package com.c2kernel.collection; import com.c2kernel.common.InvalidCollectionModification; -import com.c2kernel.common.ObjectAlreadyExists; -import com.c2kernel.common.ObjectNotFound; +import com.c2kernel.common.ObjectAlreadyExistsException; +import com.c2kernel.common.ObjectNotFoundException; import com.c2kernel.lookup.ItemPath; import com.c2kernel.utils.CastorHashMap; import com.c2kernel.utils.KeyValuePair; @@ -84,8 +84,8 @@ public class Dependency extends Collection return mClassProps; } - public DependencyMember addMember(ItemPath itemPath) throws InvalidCollectionModification, ObjectAlreadyExists { - if (contains(itemPath)) throw new ObjectAlreadyExists("Item "+itemPath+" already exists in Dependency "+getName()); + public DependencyMember addMember(ItemPath itemPath) throws InvalidCollectionModification, ObjectAlreadyExistsException { + if (contains(itemPath)) throw new ObjectAlreadyExistsException("Item "+itemPath+" already exists in Dependency "+getName()); // create member object DependencyMember depMember = new DependencyMember(); depMember.setID(getCounter()); @@ -101,9 +101,9 @@ public class Dependency extends Collection @Override public DependencyMember addMember(ItemPath itemPath, CastorHashMap props, String classProps) - throws InvalidCollectionModification, ObjectAlreadyExists + throws InvalidCollectionModification, ObjectAlreadyExistsException { - if (contains(itemPath)) throw new ObjectAlreadyExists("Item "+itemPath+" already exists in Dependency "+getName()); + if (contains(itemPath)) throw new ObjectAlreadyExistsException("Item "+itemPath+" already exists in Dependency "+getName()); if (classProps != null && !classProps.equals(mClassProps)) throw new InvalidCollectionModification("Cannot change classProps in dependency member"); DependencyMember depMember = new DependencyMember(); @@ -133,14 +133,14 @@ public class Dependency extends Collection } @Override - public void removeMember(int memberId) throws ObjectNotFound { + public void removeMember(int memberId) throws ObjectNotFoundException { for (DependencyMember element : mMembers.list) { if (element.getID() == memberId) { mMembers.list.remove(element); return; } } - throw new ObjectNotFound("Member "+memberId+" not found"); + throw new ObjectNotFoundException("Member "+memberId+" not found"); } } -- cgit v1.2.3