summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/entity/proxy/ItemProxy.java
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2011-08-02 22:10:28 +0200
committerabranson <andrew.branson@cern.ch>2011-08-02 22:10:28 +0200
commit5664fd4644c78f4571a1a72e6b9f0511fb10720a (patch)
tree7be1c346d1d001bf6b079089f995a60c52b955c1 /source/com/c2kernel/entity/proxy/ItemProxy.java
parent29bbf451a22916d39017ec1a3f53f4e0f0e65ee0 (diff)
Finished move to generics. Enforced 1.6 compliance for now. No errors or
warnings :)
Diffstat (limited to 'source/com/c2kernel/entity/proxy/ItemProxy.java')
-rw-r--r--[-rwxr-xr-x]source/com/c2kernel/entity/proxy/ItemProxy.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/com/c2kernel/entity/proxy/ItemProxy.java b/source/com/c2kernel/entity/proxy/ItemProxy.java
index e816a53..702dd26 100755..100644
--- 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<Job> 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<Job> 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<Job> 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<Job> jobList = getJobList(agentId);
+ for (Job job : jobList) {
int transition = job.getPossibleTransition();
if (job.getStepName().equals(actName))
if (transition == Transitions.COMPLETE || transition == Transitions.DONE)