Closed JulyChen728 closed 4 years ago
Hi all, Our bug scanner has reported some NPE bugs.
1.The first bug is caused by the return null in function getDescendantsOf() . A possible call chain is getDescendantsOf() => EDAMOntology.java#L311 . A NullPointerException may take place at EDAMOntology.java#L313 , when the return value of method getDescendantsOf() invokes its iterator method.
return null
getDescendantsOf()
iterator
Several similar statements are at SequenceOntology.java#L329 , SequenceOntology.java#L296 , SystemsBiologyOntology.java#L331 and SystemsBiologyOntology.java#L348 .
2.The second bug is caused by the return null in function getId() . A possible call chain is SystemsBiologyOntology.java#L218 =>SystemsBiologyOntology.java#L229 . And a NPE may take place when the parameter stanzaId invokes its method trim() since it may be null .
stanzaId
trim()
null
Thanks.
Thanks. All good catches. What is the name of your bug scanner?
Fixed by PR #602
Hi all, Our bug scanner has reported some NPE bugs.
1.The first bug is caused by the
return null
in function getDescendantsOf() . A possible call chain is getDescendantsOf() => EDAMOntology.java#L311 . A NullPointerException may take place at EDAMOntology.java#L313 , when the return value of methodgetDescendantsOf()
invokes itsiterator
method.Several similar statements are at SequenceOntology.java#L329 , SequenceOntology.java#L296 , SystemsBiologyOntology.java#L331 and SystemsBiologyOntology.java#L348 .
2.The second bug is caused by the
return null
in function getId() . A possible call chain is SystemsBiologyOntology.java#L218 =>SystemsBiologyOntology.java#L229 . And a NPE may take place when the parameterstanzaId
invokes its methodtrim()
since it may benull
.Thanks.