import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import org.slf4j.Logger;
String resType = "";
if (split.length == 2)
{
- resType = split[0].trim().toUpperCase();
+ resType = split[0].trim().toUpperCase(Locale.ROOT);
}
else if (split.length == 3)
{
- resType = split[1].trim().toUpperCase();
+ resType = split[1].trim().toUpperCase(Locale.ROOT);
}
if (resType.equalsIgnoreCase("HOH") || resType.equalsIgnoreCase("WAT"))
{
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
if (os.startsWith("Linux"))
{
// ChimeraX .deb and .rpm packages put symbolic link from /usr/bin/chimerax
- pathList.add(String.format("/usr/bin/%s", chimeraExe.toLowerCase()));
+ pathList.add(String.format("/usr/bin/%s", chimeraExe.toLowerCase(Locale.ROOT)));
pathList.add(String.format("/usr/bin/%s", chimeraExe));
pathList.add(
- String.format("/usr/local/bin/%s", chimeraExe.toLowerCase()));
+ String.format("/usr/local/bin/%s", chimeraExe.toLowerCase(Locale.ROOT)));
pathList.add(String.format("/usr/local/bin/%s", chimeraExe));
// these paths also used by .deb and .rpm
pathList.add(String.format("/usr/lib/ucsf-%s/bin/%s",
- chimera.toLowerCase(), chimeraExe));
+ chimera.toLowerCase(Locale.ROOT), chimeraExe));
pathList.add(String.format("/usr/libexec/UCSF-%s/bin/%s", chimera,
chimeraExe));
// user home paths
pathList.add(String.format("%s/bin/%s",
- System.getProperty("user.home"), chimeraExe.toLowerCase()));
+ System.getProperty("user.home"), chimeraExe.toLowerCase(Locale.ROOT)));
pathList.add(String.format("%s/bin/%s",
System.getProperty("user.home"), chimeraExe));
pathList.add(String.format("%s/opt/bin/%s",
- System.getProperty("user.home"), chimeraExe.toLowerCase()));
+ System.getProperty("user.home"), chimeraExe.toLowerCase(Locale.ROOT)));
pathList.add(String.format("%s/opt/bin/%s",
System.getProperty("user.home"), chimeraExe));
pathList.add(String.format("%s/local/bin/%s",
- System.getProperty("user.home"), chimeraExe.toLowerCase()));
+ System.getProperty("user.home"), chimeraExe.toLowerCase(Locale.ROOT)));
pathList.add(String.format("%s/local/bin/%s",
System.getProperty("user.home"), chimeraExe));
}
*/
package jalview.bin;
+import java.util.Locale;
+
/**
* Methods to decide on appropriate memory setting for Jalview based on two
* optionally provided values: jvmmempc - the maximum percentage of total
+ "_CUSTOMISED_SETTINGS";
public static final String MEMORY_JVMMEMPC = NS + "_"
- + MAX_HEAPSIZE_PERCENT_PROPERTY_NAME.toUpperCase();
+ + MAX_HEAPSIZE_PERCENT_PROPERTY_NAME.toUpperCase(Locale.ROOT);
public static final String MEMORY_JVMMEMMAX = NS + "_"
- + MAX_HEAPSIZE_PROPERTY_NAME.toUpperCase();
+ + MAX_HEAPSIZE_PROPERTY_NAME.toUpperCase(Locale.ROOT);
protected static boolean logToClassChecked = false;
public static int firstCharPosIgnoreCase(String text, String chars)
{
int min = text.length() + 1;
- for (char c : chars.toLowerCase().toCharArray())
+ for (char c : chars.toLowerCase(Locale.ROOT).toCharArray())
{
- int i = text.toLowerCase().indexOf(c);
+ int i = text.toLowerCase(Locale.ROOT).indexOf(c);
if (0 <= i && i < min)
{
min = i;
import java.awt.Color;
import java.util.List;
+import java.util.Locale;
import java.util.Vector;
public class PDBChain
public PDBChain(String thePdbid, String theId, String tempFactorColumnName)
{
- this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase();
+ this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase(Locale.ROOT);
this.id = theId;
if (tempFactorColumnName!=null && tempFactorColumnName.length()>0)
{
import java.io.StringWriter;
import java.io.Writer;
import java.util.Collection;
+import java.util.Locale;
// import java.util.List;
import java.util.Map;
for(int k=0;k<4-ss.length();k++){
sb.append('0');
}
- sb.append(ss.toUpperCase());
+ sb.append(ss.toUpperCase(Locale.ROOT));
}
else{
sb.append(ch);
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
+import java.util.Locale;
/**
* Represents a Windows shortcut (typically visible to Java only as a '.lnk' file).
boolean isPotentiallyValid = false;
try {
isPotentiallyValid = file.isFile()
- && file.getName().toLowerCase().endsWith(".lnk")
+ && file.getName().toLowerCase(Locale.ROOT).endsWith(".lnk")
&& fis.available() >= minimum_length
&& isMagicPresent(getBytes(fis, 32));
} finally {