diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2013-10-27 00:27:24 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2013-10-27 00:27:24 +0200 |
| commit | 30cd736670a579985890d8c2dfe363bacbad7568 (patch) | |
| tree | 152b34486ed4a77c6d6a3a49c13b796ae669f512 /src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java | |
| parent | 0f892332b19ba8741a7db66a5c4daa386b2b5c1e (diff) | |
Beta?
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java b/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java index f2cabaa..9a3819b 100644 --- a/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java +++ b/src/main/java/com/c2kernel/lifecycle/ActivitySlotDef.java @@ -39,7 +39,7 @@ public class ActivitySlotDef extends WfVertexDef public ActivitySlotDef()
{
getProperties().put("Name", "");
- getProperties().put("Version", "last");
+ getProperties().put("Version", 0);
}
public ActivityDef getTheActivityDef() throws ObjectNotFoundException, InvalidDataException
@@ -142,9 +142,13 @@ public class ActivitySlotDef extends WfVertexDef {
return (String) getProperties().get("Name");
}
- public int getActVersion()
+ public int getActVersion() throws InvalidDataException
{
- return (Integer) getProperties().get("Version");
+ Object verObj = getProperties().get("Version");
+ if (verObj instanceof Integer)
+ return (Integer)verObj;
+ else
+ throw new InvalidDataException("Version string was not an integer", "");
}
@Override
|
