From 75b20e5801583265188f7d0df20de21b70cd09f7 Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Fri, 29 Aug 2014 22:50:49 +0000 Subject: [PATCH] Some additional error checking in explicit.StateValues (from Joachim Klein). git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@9160 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/explicit/StateValues.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/prism/src/explicit/StateValues.java b/prism/src/explicit/StateValues.java index 76ca67b8..9dbd578a 100644 --- a/prism/src/explicit/StateValues.java +++ b/prism/src/explicit/StateValues.java @@ -211,7 +211,7 @@ public class StateValues implements StateVector { return getBitSetFromInterval(RelOp.parseSymbol(relOpString), bound); } - + /** * Generate BitSet for states in the given interval * (interval specified as relational operator and bound) @@ -241,8 +241,9 @@ public class StateValues implements StateVector for (int i = 0; i < size; i++) { sol.set(i, valuesI[i] < bound); } + break; default: - // Don't handle + throw new PrismException("Unsupported operator " + relOp + " for getBitSetFromInterval()"); } } else if (type instanceof TypeDouble) { switch (relOp) { @@ -265,8 +266,9 @@ public class StateValues implements StateVector for (int i = 0; i < size; i++) { sol.set(i, valuesD[i] < bound); } + break; default: - // Don't handle + throw new PrismException("Unsupported operator " + relOp + " for getBitSetFromInterval()"); } } else { throw new PrismException("Can't getBitSetFromInterval for a vector of type " + type); @@ -1283,7 +1285,7 @@ public class StateValues implements StateVector { return size; } - + @Override public Object getValue(int i) {