From 23ad471234d4095e80fcfb743c315a55ff745c33 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 5 Aug 2020 22:57:13 +0100 Subject: [PATCH] JAL-3691 Changed .toUppoerCase().startsWith(...) to .regionMatches(true,...) as upper-cased 'i' in Turkish is not 'I'. --- src/jalview/io/ScoreMatrixFile.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jalview/io/ScoreMatrixFile.java b/src/jalview/io/ScoreMatrixFile.java index 0b70dce..ee7503d 100644 --- a/src/jalview/io/ScoreMatrixFile.java +++ b/src/jalview/io/ScoreMatrixFile.java @@ -20,13 +20,13 @@ */ package jalview.io; +import java.io.IOException; +import java.util.StringTokenizer; + import jalview.analysis.scoremodels.ScoreMatrix; import jalview.analysis.scoremodels.ScoreModels; import jalview.datamodel.SequenceI; -import java.io.IOException; -import java.util.StringTokenizer; - /** * A class that can parse a file containing a substitution matrix and register * it for use in Jalview @@ -131,7 +131,8 @@ public class ScoreMatrixFile extends AlignFile { continue; } - if (data.toUpperCase().startsWith(SCOREMATRIX)) + // equivalent to data.startsWithIgnoreCase(SCOREMATRIX) + if (data.regionMatches(true, 0, SCOREMATRIX, 0, SCOREMATRIX.length())) { /* * Parse name from ScoreMatrix -- 1.7.10.2