*/
package jalview.gui;
+import java.util.Locale;
+
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
* show local rather than linked feature coordinates
*/
int[] beginRange = mf.getMappedPositions(start, start);
- start = beginRange[0];
int[] endRange = mf.getMappedPositions(end, end);
+ if (beginRange == null || endRange == null)
+ {
+ // e.g. variant extending to stop codon so not mappable
+ return;
+ }
+ start = beginRange[0];
end = endRange[endRange.length - 1];
}
StringBuilder desc = new StringBuilder();
for (int d = 0; d < nd; d++)
{
DBRefEntry e = dbr.get(d);
- String src = e.getSource(); // jalview.util.DBRefUtils.getCanonicalName(dbr[d].getSource()).toUpperCase();
+ String src = e.getSource(); // jalview.util.DBRefUtils.getCanonicalName(dbr[d].getSource()).toUpperCase(Locale.ROOT);
Object[] sarray = commonDbrefs.get(src);
if (sarray == null)
{
boolean usingNames = false;
// Now see which parts of the group apply for this URL
String ltarget = urlLink.getTarget(); // jalview.util.DBRefUtils.getCanonicalName(urlLink.getTarget());
- Object[] idset = commonDbrefs.get(ltarget.toUpperCase());
+ Object[] idset = commonDbrefs.get(ltarget.toUpperCase(Locale.ROOT));
String[] seqstr, ids; // input to makeUrl
if (idset != null)
{