From 08f51db72b37addca7babd1582bfe5c6eaab2f2c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 28 Sep 2016 15:20:46 +0100 Subject: [PATCH] JAL-2210 patch for when no DBRefs on sequence --- src/jalview/util/DBRefUtils.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/jalview/util/DBRefUtils.java b/src/jalview/util/DBRefUtils.java index 2d09088..757fc4d 100755 --- a/src/jalview/util/DBRefUtils.java +++ b/src/jalview/util/DBRefUtils.java @@ -650,8 +650,16 @@ public class DBRefUtils return; } List selfs = new ArrayList(); - selfs.addAll(Arrays.asList(selectDbRefs(!sequence.isProtein(), - sequence.getDBRefs()))); + { + DBRefEntry[] selfArray = selectDbRefs(!sequence.isProtein(), + sequence.getDBRefs()); + if (selfArray == null || selfArray.length == 0) + { + // nothing to do + return; + } + selfs.addAll(Arrays.asList(selfArray)); + } // filter non-primary refs for (DBRefEntry p : pr) -- 1.7.10.2