Skip to content

Commit

Permalink
A safe null check in biopaxModel.getOrCreateXref()
Browse files Browse the repository at this point in the history
  • Loading branch information
metincansiper committed Jun 1, 2018
1 parent dbc9d8c commit c1bd877
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/model/BioPAXModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ public <T extends PhysicalEntity> T getOrCreatePhysicalEntity(Class<T> c) {
}

public UnificationXref getOrCreateXref(XrefModel xrefModel) {

if (xrefModel == null) {
return null;
}

String xrefId = xrefModel.getId();
UnificationXref xref = xrefMap.get(xrefId);

Expand Down

0 comments on commit c1bd877

Please sign in to comment.