Commit 73417457 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

handle nulls in normalizing ids

parent d8149b6d
Pipeline #34551 passed with stage
in 14 minutes and 48 seconds
......@@ -69,7 +69,7 @@ public class CellDesignerElementCollection {
String sbmlId = getSbmlId(modelElement, true);
if (sbmlIdByElement.get(sbmlId) == null) {
String normalizedId = normalizeIdToCellDesigner(modelElement.getElementId());
if (!normalizedId.equals(modelElement.getElementId())) {
if (!Objects.equals(normalizedId, modelElement.getElementId())) {
logger.warn(new LogMarker(ProjectLogEntryType.EXPORT_ISSUE, modelElement), "Invalid element id");
}
String id = "s_id_" + normalizeIdToCellDesigner(modelElement.getElementId());
......@@ -296,6 +296,9 @@ public class CellDesignerElementCollection {
}
protected String normalizeIdToCellDesigner(String id) {
if (id == null) {
return null;
}
return id.replaceAll("[:\\.-]", "_");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment