From 571b184461f5b14c59ed33959d1baa9af9143f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Picault?= Date: Mon, 16 Nov 2020 21:53:20 +0100 Subject: [PATCH] see #34: workaround for NG bug related to missing BaseVoltages --- src/main/java/ocl/service/TransformationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ocl/service/TransformationService.java b/src/main/java/ocl/service/TransformationService.java index 0fad35a..f8ea6de 100644 --- a/src/main/java/ocl/service/TransformationService.java +++ b/src/main/java/ocl/service/TransformationService.java @@ -596,7 +596,7 @@ public synchronized Document createMerge(Profile key,Profile eqbd, Profile tpbd, for (Node child : convertToArray(TPs2add.get(t).getChildNodes())) { if(!StringUtils.isEmpty(child.getLocalName()) && StringUtils.contains(child.getLocalName(),"BaseVoltage")){ bv = (child.getAttributes().item(0).getNodeValue().replace("#","")); - if(!declaredBV.containsKey(bv)){ + if ((!declaredBV.containsKey(bv)) && (BVmap.get(bv)!=null)){ Node node1 = target.importNode(BVmap.get(bv),true); addModelBrlndDependency(target.getDocumentElement().appendChild(node1),EQ.type,eqbd.id,target); declaredBV.put(bv,node1);