X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FWSWUBlastClient.java;h=e24c2f3540d73bb57fe1420b98fe060587d0eff4;hb=c49683bef626d9c1de9d06e5f11039e6d4df55c3;hp=d526a3135a43edcae5849ac4dfc04d10fbac9112;hpb=106a3890f956e2aa7780b2985f4326655912a558;p=jalview.git diff --git a/src/jalview/io/WSWUBlastClient.java b/src/jalview/io/WSWUBlastClient.java index d526a31..e24c2f3 100755 --- a/src/jalview/io/WSWUBlastClient.java +++ b/src/jalview/io/WSWUBlastClient.java @@ -32,6 +32,7 @@ import jalview.util.MessageManager; import java.util.ArrayList; import java.util.Enumeration; +import java.util.List; import java.util.StringTokenizer; import java.util.Vector; @@ -149,7 +150,7 @@ public class WSWUBlastClient { // This must be outside the run() body as java 1.5 // will not return any value from the OptionPane to the expired thread. - int reply = JvOptionPane.showConfirmDialog(Desktop.desktop, + int reply = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), "Automatically update suggested ids?", "Auto replace sequence ids", JvOptionPane.YES_NO_OPTION); @@ -175,12 +176,13 @@ public class WSWUBlastClient } } - DBRefEntry[] entries = oldseq.getDBRefs(); - if (entries != null) + List entries = oldseq.getDBRefs(); + // BH 2019.01.25 check for 0-length was missing here + if (entries != null && entries.size() > 0) { oldseq.addDBRef(new jalview.datamodel.DBRefEntry( jalview.datamodel.DBRefSource.UNIPROT, "0", - entries[0].getAccessionId())); + entries.get(0).getAccessionId())); } } }