if (j > -1) {
ext = filename.substring(j+1);
}
- if (ext != null && LOCATOR_FILE_EXTENSION.equals(ext.toLowerCase())) {
+ if (ext != null && LOCATOR_FILE_EXTENSION.equals(ext.toLowerCase(Locale.ROOT))) {
// this file extension should have been dealt with in Getdown class
} else {
_appargs.add(0, "-open");
String locatorFilename = filenames.length >= 1 ? filenames[0] : null;
if (
!StringUtil.isBlank(locatorFilename)
- && locatorFilename.toLowerCase().endsWith("."+Application.LOCATOR_FILE_EXTENSION)
+ && locatorFilename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)
) {
setLocatorFile(locatorFilename);
// remove the locator filename from the filenames array
// skip any other locator files in a multiple file list
if (filename.startsWith("jalview://") || filename.startsWith("jalviews://")) {
setJalviewUri(filename);
- } else if (! filename.toLowerCase().endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
+ } else if (! filename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)) {
addStartupFile(filename);
}
}
String argvLocatorFilename = argv.length > 2 ? argv[2] : null;
if (
!StringUtil.isBlank(argvLocatorFilename)
- && argvLocatorFilename.toLowerCase().endsWith("."+Application.LOCATOR_FILE_EXTENSION)
+ && argvLocatorFilename.toLowerCase(Locale.ROOT).endsWith("."+Application.LOCATOR_FILE_EXTENSION)
) {
notes.add(Note.info("locatorFilename in args: '"+argv[2]+"'"));
Application.setLocatorFile(argvLocatorFilename);
MessageDigest md = MessageDigest.getInstance(algo);
md.update(Files.readAllBytes(Paths.get(file.getAbsolutePath())));
byte[] digest = md.digest();
- checksum = DatatypeConverter.printHexBinary(digest).toUpperCase();
+ checksum = DatatypeConverter.printHexBinary(digest).toUpperCase(Locale.ROOT);
} catch (Exception e) {
System.out.println("Couldn't create "+algo+" digest of "+file.getPath());
}
package jalview.bin;
import java.awt.HeadlessException;
+import java.util.Locale;
+
public class HiDPISetting
{
static
{
String system = System.getProperty("os.name") == null ? null
- : System.getProperty("os.name").toLowerCase();
+ : System.getProperty("os.name").toLowerCase(Locale.ROOT);
if (system != null)
{
isLinux = system.indexOf("linux") > -1;
* @author bsoares
*
*/
+import java.util.Locale;
public class MemorySetting
{
+ "_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;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import java.util.regex.Pattern;
public class StringUtils
}
if (s.length() <= 1)
{
- return s.toUpperCase();
+ return s.toUpperCase(Locale.ROOT);
}
- return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();
+ return s.substring(0, 1).toUpperCase(Locale.ROOT) + s.substring(1).toLowerCase(Locale.ROOT);
}
/**
{
return null;
}
- String tmp2up = text.toUpperCase();
+ String tmp2up = text.toUpperCase(Locale.ROOT);
int startTag = tmp2up.indexOf("<HTML>");
if (startTag > -1)
{
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;