X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FGeneticCodes.java;h=8d69b0ba679e0156f237eaa79ea55b840af22062;hb=46a4e39d7689a8dab31689a0f9c089b0b8549d5e;hp=137b7f8316e8b21e4e75b581fd81dfbe65e30c18;hpb=c491024e7256817870ff7d53f35ea55db045681d;p=jalview.git diff --git a/src/jalview/analysis/GeneticCodes.java b/src/jalview/analysis/GeneticCodes.java index 137b7f8..8d69b0b 100644 --- a/src/jalview/analysis/GeneticCodes.java +++ b/src/jalview/analysis/GeneticCodes.java @@ -1,5 +1,27 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.analysis; +import java.util.Locale; + import jalview.bin.Cache; import java.io.BufferedReader; @@ -178,13 +200,13 @@ public final class GeneticCodes while (line != null) { line = readLine(dataIn); - if (line != null && !"DNA".equals(line.toUpperCase())) + if (line != null && !"DNA".equals(line.toUpperCase(Locale.ROOT))) { String[] tokens = line.split("\\t"); if (tokens.length == 2) { - ambiguityCodes.put(tokens[0].toUpperCase(), - tokens[1].toUpperCase()); + ambiguityCodes.put(tokens[0].toUpperCase(Locale.ROOT), + tokens[1].toUpperCase(Locale.ROOT)); } else { @@ -321,13 +343,13 @@ public final class GeneticCodes @Override public String translateCanonical(String codon) { - return codons.get(codon.toUpperCase()); + return codons.get(codon.toUpperCase(Locale.ROOT)); } @Override public String translate(String codon) { - String upper = codon.toUpperCase(); + String upper = codon.toUpperCase(Locale.ROOT); String peptide = translateCanonical(upper); /*