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
0a11309f
Commit
0a11309f
authored
May 27, 2019
by
Piotr Gawron
Browse files
copy line only if not null
parent
50e32778
Changes
1
Hide whitespace changes
Inline
Side-by-side
model/src/main/java/lcsb/mapviewer/model/map/reaction/Reaction.java
View file @
0a11309f
...
...
@@ -288,7 +288,9 @@ public class Reaction implements BioEntity {
throw
new
InvalidReactionParticipantNumberException
(
new
ElementUtils
().
getElementTag
(
original
)
+
"Invalid source reaction: number of reactants must be at least "
+
minReactants
);
}
line
=
new
PolylineData
(
original
.
getLine
());
if
(
original
.
getLine
()
!=
null
)
{
line
=
new
PolylineData
(
original
.
getLine
());
}
}
public
Reaction
(
String
reactionId
)
{
...
...
@@ -406,10 +408,10 @@ public class Reaction implements BioEntity {
/**
* Return list of all lines in the reaction that describe it.
*
* @return list of all lines that describes every connection in the rection
* @return list of all lines that describes every connection in the re
a
ction
*/
public
List
<
Line2D
>
getLines
()
{
List
<
Line2D
>
result
=
new
ArrayList
<
Line2D
>();
List
<
Line2D
>
result
=
new
ArrayList
<>();
for
(
AbstractNode
node
:
nodes
)
{
result
.
addAll
(
node
.
getLine
().
getLines
());
}
...
...
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