From 5664fd4644c78f4571a1a72e6b9f0511fb10720a Mon Sep 17 00:00:00 2001 From: abranson Date: Tue, 2 Aug 2011 22:10:28 +0200 Subject: Finished move to generics. Enforced 1.6 compliance for now. No errors or warnings :) --- source/com/c2kernel/entity/proxy/ItemProxy.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) mode change 100755 => 100644 source/com/c2kernel/entity/proxy/ItemProxy.java (limited to 'source/com/c2kernel/entity/proxy/ItemProxy.java') diff --git a/source/com/c2kernel/entity/proxy/ItemProxy.java b/source/com/c2kernel/entity/proxy/ItemProxy.java old mode 100755 new mode 100644 index e816a53..702dd26 --- a/source/com/c2kernel/entity/proxy/ItemProxy.java +++ b/source/com/c2kernel/entity/proxy/ItemProxy.java @@ -152,7 +152,7 @@ public class ItemProxy extends EntityProxy /************************************************************************** * **************************************************************************/ - private ArrayList getJobList(int agentId, boolean filter) + private ArrayList getJobList(int agentId, boolean filter) throws AccessRightsException, ObjectNotFoundException, PersistencyException @@ -163,14 +163,13 @@ public class ItemProxy extends EntityProxy thisJobList = (JobArrayList)CastorXMLUtility.unmarshall(jobs); } catch (Exception e) { - Logger.error("Exception::ItemProxy::getJobList() - Cannot unmarshall the jobs"); Logger.error(e); - return new ArrayList(); + throw new PersistencyException("Exception::ItemProxy::getJobList() - Cannot unmarshall the jobs", null); } return thisJobList.list; } - public ArrayList getJobList(AgentProxy agent) + public ArrayList getJobList(AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, PersistencyException @@ -178,7 +177,7 @@ public class ItemProxy extends EntityProxy return getJobList(agent.getSystemKey()); } - private ArrayList getJobList(int agentId) + private ArrayList getJobList(int agentId) throws AccessRightsException, ObjectNotFoundException, PersistencyException @@ -191,9 +190,8 @@ public class ItemProxy extends EntityProxy ObjectNotFoundException, PersistencyException { - ArrayList jobList = getJobList(agentId); - for (Object jobObj : jobList) { - Job job = (Job)jobObj; + ArrayList jobList = getJobList(agentId); + for (Job job : jobList) { int transition = job.getPossibleTransition(); if (job.getStepName().equals(actName)) if (transition == Transitions.COMPLETE || transition == Transitions.DONE) -- cgit v1.2.3