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/Collection.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/c2kernel/collection/Collection.java') diff --git a/src/main/java/com/c2kernel/collection/Collection.java b/src/main/java/com/c2kernel/collection/Collection.java index fa0230b..7ab9fb2 100644 --- a/src/main/java/com/c2kernel/collection/Collection.java +++ b/src/main/java/com/c2kernel/collection/Collection.java @@ -23,8 +23,8 @@ package com.c2kernel.collection; import java.util.Iterator; 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.entity.C2KLocalObject; import com.c2kernel.graph.model.GraphModel; import com.c2kernel.lookup.ItemPath; @@ -155,12 +155,12 @@ abstract public class Collection implements C2KLocal return true; } - public E getMember(int memberId) throws ObjectNotFound { + public E getMember(int memberId) throws ObjectNotFoundException { for (E element : mMembers.list) { if (element.getID() == memberId) return element; } - throw new ObjectNotFound("Member "+memberId+" not found in "+mName); + throw new ObjectNotFoundException("Member "+memberId+" not found in "+mName); } public CollectionMemberList getMembers() @@ -168,9 +168,9 @@ abstract public class Collection implements C2KLocal return mMembers; } - public abstract E addMember(ItemPath itemPath, CastorHashMap props, String classProps) throws InvalidCollectionModification, ObjectAlreadyExists; + public abstract E addMember(ItemPath itemPath, CastorHashMap props, String classProps) throws InvalidCollectionModification, ObjectAlreadyExistsException; - public abstract void removeMember(int memberId) throws ObjectNotFound; + public abstract void removeMember(int memberId) throws ObjectNotFoundException; @Override public boolean equals(Object other) { @@ -183,7 +183,7 @@ abstract public class Collection implements C2KLocal E thisMem = i.next(); CollectionMember otherMem = otherColl.getMember(thisMem.getID()); if (!thisMem.equals(otherMem)) return false; - } catch (ObjectNotFound ex) { + } catch (ObjectNotFoundException ex) { return false; } } -- cgit v1.2.3