]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Bugfix to Sysdyn unit parsing for functions (refs #4779).
authormiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 21 Mar 2014 10:41:58 +0000 (10:41 +0000)
committermiettinen <miettinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 21 Mar 2014 10:41:58 +0000 (10:41 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29184 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn/src/org/simantics/sysdyn/utils/Function.java

index bedd3247a46ce04f6e8409acadc91bd75ce4b102..ddec7b6589485f6300fefc6a74cda50d7ea4b6d4 100644 (file)
@@ -91,7 +91,7 @@ public class Function implements Comparable<Function>{
                while ((index = ret.indexOf('\'')) >= 0) {\r
                        String replaced = ret.substring(index, index + 2); // The replaced units are always of length 2.\r
                        try {\r
-                               ret = ret.replace(replaced, correspondences.get(replaced));\r
+                               ret = ret.replace(replaced, "(" + correspondences.get(replaced) + ")");\r
                        } catch (NullPointerException npe) {\r
                                throw new UnitCheckingException("Function " + f.getName() + " output unit could not be determined. Replacement unit " \r
                                                + replaced + " not found in input unit definitions.");\r