Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
73417457
Commit
73417457
authored
Nov 23, 2020
by
Piotr Gawron
Browse files
handle nulls in normalizing ids
parent
d8149b6d
Pipeline
#34551
passed with stage
in 14 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
converter-CellDesigner/src/main/java/lcsb/mapviewer/converter/model/celldesigner/CellDesignerElementCollection.java
View file @
73417457
...
...
@@ -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
(
"[:\\.-]"
,
"_"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment