From d836fdf0564204d853e3ec844c8dbaec27d3cf23 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 8 Dec 2005 14:08:22 +0000 Subject: [PATCH] exception checks for (de)uniquify --- src/jalview/analysis/SeqsetUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index 4432414..40869c2 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -66,6 +66,8 @@ public class SeqsetUtils public static boolean SeqCharacterUnhash(SequenceI sq, Hashtable sqinfo) { boolean namePresent = true; + if (sqinfo==null) + return false; String oldname = (String) sqinfo.get("Name"); Integer start = (Integer) sqinfo.get("Start"); Integer end = (Integer) sqinfo.get("End"); @@ -81,8 +83,7 @@ public class SeqsetUtils { sq.setName(oldname); } - - if (!pdbid.equals("")) + if (pdbid!=null && pdbid.size()>0) { sq.setPDBId(pdbid); } -- 1.7.10.2