From: jprocter Date: Thu, 8 Dec 2005 14:08:22 +0000 (+0000) Subject: exception checks for (de)uniquify X-Git-Tag: Release_2_07~30 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d836fdf0564204d853e3ec844c8dbaec27d3cf23;p=jalview.git exception checks for (de)uniquify --- 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); }