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/Aggregation.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/java/com/c2kernel/collection/Aggregation.java') diff --git a/src/main/java/com/c2kernel/collection/Aggregation.java b/src/main/java/com/c2kernel/collection/Aggregation.java index b4d1b6b..ea1c182 100644 --- a/src/main/java/com/c2kernel/collection/Aggregation.java +++ b/src/main/java/com/c2kernel/collection/Aggregation.java @@ -21,8 +21,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.graph.model.GraphModel; import com.c2kernel.graph.model.GraphPoint; import com.c2kernel.graph.model.TypeNameAndConstructionInfo; @@ -117,7 +117,7 @@ abstract public class Aggregation extends Collection } public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps, GraphPoint location, int w, int h) - throws InvalidCollectionModification, ObjectAlreadyExists + throws InvalidCollectionModification, ObjectAlreadyExistsException { AggregationMember aggMem = addSlot(props, classProps, location, w, h); if (itemPath != null) { // some clients use this method when not setting a member @@ -130,7 +130,7 @@ abstract public class Aggregation extends Collection @Override - public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps) throws InvalidCollectionModification, ObjectAlreadyExists + public AggregationMember addMember(ItemPath itemPath, CastorHashMap props, String classProps) throws InvalidCollectionModification, ObjectAlreadyExistsException { return addMember(itemPath, props, classProps, null, -1, -1); } @@ -139,7 +139,7 @@ abstract public class Aggregation extends Collection public AggregationMember addMember(CastorHashMap props, String classProps, GraphPoint location, int w, int h) throws InvalidCollectionModification { try { return addMember(null, props, classProps, location, w, h); - } catch (ObjectAlreadyExists e) { // not assigning an item so this won't happen + } catch (ObjectAlreadyExistsException e) { // not assigning an item so this won't happen return null; } } @@ -150,7 +150,7 @@ abstract public class Aggregation extends Collection } @Override - public void removeMember(int memberId) throws ObjectNotFound { + public void removeMember(int memberId) throws ObjectNotFoundException { for (AggregationMember element : mMembers.list) { if (element.getID() == memberId) { element.clearItem(); @@ -158,7 +158,7 @@ abstract public class Aggregation extends Collection return; } } - throw new ObjectNotFound("Member "+memberId+" not found"); + throw new ObjectNotFoundException("Member "+memberId+" not found"); } static public boolean getIsComposite(ItemPath itemPath, String name) @@ -167,7 +167,7 @@ abstract public class Aggregation extends Collection try { for(String collName: Gateway.getProxyManager().getProxy(itemPath).getContents(ClusterStorage.COLLECTION) ) if (name == null || name.equals(collName)) return true; - } catch (ObjectNotFound e) { + } catch (ObjectNotFoundException e) { return false; } return false; -- cgit v1.2.3