import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.List;
import java.util.StringTokenizer;
import java.util.Vector;
{
// 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);
}
}
- DBRefEntry[] entries = oldseq.getDBRefs();
- if (entries != null)
+ List<DBRefEntry> 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()));
}
}
}