summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-08-25 13:53:33 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-08-25 13:53:33 +0200
commitf7df981d031e360b379b86d9aefdde15b918b21f (patch)
tree44f08a278514dee9be01ffba67da8db85547d907 /src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java
parentbdb708127a7f0e1ef065a49377341843e12672cb (diff)
Require integers for all resource versions
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java')
-rw-r--r--src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java b/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java
index 74d8305..885f613 100644
--- a/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java
+++ b/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java
@@ -44,7 +44,13 @@ public class ActivitySlotDef extends WfVertexDef
public ActivityDef getTheActivityDef() throws ObjectNotFoundException, InvalidDataException
{
- ActivityDef actDef = LocalObjectLoader.getActDef(getActivityDef(), getActVersion());
+ int actVersion;
+ try {
+ actVersion = Integer.parseInt(getActVersion());
+ } catch (NumberFormatException ex) {
+ throw new InvalidDataException("Non-integer activitiy version set for slot "+getActName(), "");
+ }
+ ActivityDef actDef = LocalObjectLoader.getActDef(getActivityDef(), actVersion);
if (actDef instanceof CompositeActivityDef)
mIsComposite = true;
return actDef;