X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FDBRefEntry.java;h=efdf0acc322eb7b329b03929d08b15a462e17a92;hb=a24dd1c4927582a629b2ce43c3786abe1c247847;hp=738c4dc831caf71090ddf09bd57ff458f468be44;hpb=ea36a0b44f1661422284e55ad5e137a0c81821f1;p=jalview.git diff --git a/src/jalview/datamodel/DBRefEntry.java b/src/jalview/datamodel/DBRefEntry.java index 738c4dc..efdf0ac 100755 --- a/src/jalview/datamodel/DBRefEntry.java +++ b/src/jalview/datamodel/DBRefEntry.java @@ -112,7 +112,7 @@ public class DBRefEntry implements DBRefEntryI * @return */ @Override - public boolean updateFrom(DBRefEntry other) + public boolean updateFrom(DBRefEntryI other) { if (other == null) { @@ -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; }