From bbc508f2b93cd70f0e37779cd6e9154d367ba25b Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Tue, 28 May 2019 09:24:21 +0100 Subject: [PATCH] Bug fix: tra extension does not need to be first listed in -importmodel. Also remove some redundant code. --- prism/src/prism/PrismCL.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/prism/src/prism/PrismCL.java b/prism/src/prism/PrismCL.java index 71835e99..e1439881 100644 --- a/prism/src/prism/PrismCL.java +++ b/prism/src/prism/PrismCL.java @@ -1902,9 +1902,6 @@ public class PrismCL implements PrismModelListener } else if (ext.equals("tra")) { importtrans = true; modelFilename = basename + ".tra"; - } else if (ext.equals("tra")) { - importtrans = true; - modelFilename = basename + ".tra"; } else if (ext.equals("sta")) { importstates = true; importStatesFilename = basename + ".sta"; @@ -1919,10 +1916,10 @@ public class PrismCL implements PrismModelListener else { throw new PrismException("Unknown extension \"" + ext + "\" for -importmodel switch"); } - // Check at least the transition matrix was imported - if (!importtrans) { - throw new PrismException("You must import the transition matrix when using -importmodel (use option \"tra\" or \"all\")"); - } + } + // Check at least the transition matrix was imported + if (!importtrans) { + throw new PrismException("You must import the transition matrix when using -importmodel (use option \"tra\" or \"all\")"); } // No options supported currently /*// Process options