From 7bd16909e3697a4aca03e2dd0654ff6b1262ddb3 Mon Sep 17 00:00:00 2001 From: Kenneth Lausdahl Date: Thu, 13 Jun 2024 12:42:03 +0200 Subject: [PATCH] fix missing dependencies in modeldescription fmi3 --- .../kotlin/org/intocps/maestro/fmi/fmi3/Fmi3ModelDescription.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmi/src/main/kotlin/org/intocps/maestro/fmi/fmi3/Fmi3ModelDescription.kt b/fmi/src/main/kotlin/org/intocps/maestro/fmi/fmi3/Fmi3ModelDescription.kt index 089ee463..07a0156a 100644 --- a/fmi/src/main/kotlin/org/intocps/maestro/fmi/fmi3/Fmi3ModelDescription.kt +++ b/fmi/src/main/kotlin/org/intocps/maestro/fmi/fmi3/Fmi3ModelDescription.kt @@ -284,7 +284,7 @@ class Fmi3ModelDescription : ModelDescription { return Fmi3ModelStructureElement( valueOf(node.nodeName), node.attributes.getNamedItem("valueReference").nodeValue.toUInt(), - node.attributes.getNamedItem("dependencies")?.nodeValue?.split(" ") + node.attributes.getNamedItem("dependencies")?.nodeValue?.split(" ")?.filter { value->value.trim().length>0 } ?.map { value -> value.toUInt() }, (node.attributes.getNamedItem("dependenciesKind")?.nodeValue ?: "").let { dependencyKinds -> if (dependencyKinds.isEmpty()) null else dependencyKinds.split(" ")