From 3d1147ffae5fbc5bdb7c80caa9655df656b8e67b Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 15 Aug 2008 10:01:05 +0000 Subject: [PATCH] safer copy constructor --- src/jalview/datamodel/DBRefEntry.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 1.7.10.2