From: jprocter Date: Fri, 15 Aug 2008 10:01:05 +0000 (+0000) Subject: safer copy constructor X-Git-Tag: Release_2_4~25 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3d1147ffae5fbc5bdb7c80caa9655df656b8e67b;p=jalview.git safer copy constructor --- diff --git a/src/jalview/datamodel/DBRefEntry.java b/src/jalview/datamodel/DBRefEntry.java index 7491da2..b6c3192 100755 --- a/src/jalview/datamodel/DBRefEntry.java +++ b/src/jalview/datamodel/DBRefEntry.java @@ -47,7 +47,10 @@ public class DBRefEntry } public DBRefEntry(DBRefEntry entry) { - this(new String(entry.source), new String(entry.version), new String(entry.accessionId), new Mapping(entry.map)); + this((entry.source==null ? "" : new String(entry.source)), + (entry.version==null ? "" : new String(entry.version)), + (entry.accessionId==null ? "" : new String(entry.accessionId)), + (entry.map==null ? null : new Mapping(entry.map))); } public boolean equals(DBRefEntry entry) { if (entry==this)