From: Jim Procter Date: Mon, 20 Jun 2016 08:59:58 +0000 (+0100) Subject: JAL-2110 catch case when updateDBRef argument has null version string X-Git-Tag: Release_2_10_0~140^2~5^2~49^2~4 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e8814cc25a95119c8201007f32035170db2ed299;p=jalview.git JAL-2110 catch case when updateDBRef argument has null version string --- diff --git a/src/jalview/datamodel/DBRefEntry.java b/src/jalview/datamodel/DBRefEntry.java index 66a075e..efdf0ac 100755 --- a/src/jalview/datamodel/DBRefEntry.java +++ b/src/jalview/datamodel/DBRefEntry.java @@ -150,6 +150,7 @@ public class DBRefEntry implements DBRefEntryI * otherwise the versions have to match */ String otherVersion = other.getVersion(); + if ((version == null || version.equals("0") || version.endsWith(":0")) && otherVersion != null) { @@ -157,7 +158,9 @@ public class DBRefEntry implements DBRefEntryI } else { - if (!version.equalsIgnoreCase(otherVersion)) + if (version != null + && (otherVersion == null || !version + .equalsIgnoreCase(otherVersion))) { return false; }