JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / src / jalview / gui / Desktop.java
index e214816..666fb4e 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.gui;
 
+import java.util.Locale;
+
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -850,13 +852,8 @@ public class Desktop extends jalview.jbgui.GDesktop
     } catch (java.beans.PropertyVetoException ve) {
     } catch (java.lang.ClassCastException cex) {
       Cache.log.warn(
-<<<<<<< HEAD
           "Squashed a possible GUI implementation error. If you can recreate this, please look at https://issues.jalview.org/browse/JAL-869",
           cex);
-=======
-              "Squashed a possible GUI implementation error. If you can recreate this, please look at https://issues.jalview.org/browse/JAL-869",
-              cex);
->>>>>>> 48040645e (JAL-3741 http to https (and jar to jvp for exampleFile defaults!))
     }
   }
 
@@ -1021,15 +1018,6 @@ public class Desktop extends jalview.jbgui.GDesktop
 
     JPanel panel = new JPanel(new GridLayout(2, 1));
     panel.add(label);
-<<<<<<< HEAD
-=======
-    panel.add(history);
-    history.setPreferredSize(new Dimension(400, 20));
-    history.setEditable(true);
-    history.addItem("https://www.");
-
-    String historyItems = jalview.bin.Cache.getProperty("RECENT_URL");
->>>>>>> 48040645e (JAL-3741 http to https (and jar to jvp for exampleFile defaults!))
 
     /*
      * the URL to fetch is input in Java: an editable combobox with history JS:
@@ -1069,7 +1057,7 @@ public class Desktop extends jalview.jbgui.GDesktop
         String url = (history instanceof JTextField ? ((JTextField) history).getText()
             : ((JComboBox<String>) history).getEditor().getItem().toString().trim());
 
-        if (url.toLowerCase().endsWith(".jar")) {
+        if (url.toLowerCase(Locale.ROOT).endsWith(".jar")) {
           if (viewport != null) {
             new FileLoader().LoadFile(viewport, url, DataSourceType.URL, FileFormat.Jalview);
           } else {
@@ -1195,14 +1183,13 @@ public class Desktop extends jalview.jbgui.GDesktop
       // message.append("<br>...Checking latest version...</br>");
     } else if (!latestVersion.equals(Cache.getProperty("VERSION"))) {
       boolean red = false;
-      if (Cache.getProperty("VERSION").toLowerCase().indexOf("automated build") == -1) {
+      if (Cache.getProperty("VERSION").toLowerCase(Locale.ROOT).indexOf("automated build") == -1) {
         red = true;
         // Displayed when code version and jnlp version do not match and code
         // version is not a development build
         message.append("<div style=\"color: #FF0000;font-style: bold;\">");
       }
 
-<<<<<<< HEAD
       message.append("<br>!! Version ").append(Cache.getDefault("LATEST_VERSION", "..Checking.."))
           .append(" is available for download from ")
           .append(Cache.getDefault("www.jalview.org", "https://www.jalview.org")).append(" !!");
@@ -1217,31 +1204,6 @@ public class Desktop extends jalview.jbgui.GDesktop
     message.append("</div>");
 
     return message.toString();
-=======
-      message.append("<br>!! Version "
-              + jalview.bin.Cache.getDefault("LATEST_VERSION",
-                      "..Checking..")
-              + " is available for download from "
-              + jalview.bin.Cache.getDefault("www.jalview.org",
-                      "https://www.jalview.org")
-              + " !!");
-      if (red)
-      {
-        message.append("</div>");
-      }
-    }
-    message.append("<br>Authors:  " + jalview.bin.Cache.getDefault(
-            "AUTHORFNAMES",
-            "The Jalview Authors (See AUTHORS file for current list)")
-            + "<br><br>Development managed by The Barton Group, University of Dundee, Scotland, UK.<br>"
-            + "<br><br>For help, see the FAQ at <a href=\"https://www.jalview.org/faq\">www.jalview.org/faq</a> and/or join the jalview-discuss@jalview.org mailing list"
-            + "<br><br>If  you use Jalview, please cite:"
-            + "<br>Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)"
-            + "<br>Jalview Version 2 - a multiple sequence alignment editor and analysis workbench"
-            + "<br>Bioinformatics doi: 10.1093/bioinformatics/btp033"
-            + "</html>");
-    return message;
->>>>>>> 48040645e (JAL-3741 http to https (and jar to jvp for exampleFile defaults!))
   }
 
   /**
@@ -2709,7 +2671,7 @@ public class Desktop extends jalview.jbgui.GDesktop
             continue;
           }
           java.net.URI uri = new java.net.URI(s);
-          if (uri.getScheme().toLowerCase().startsWith("http")) {
+          if (uri.getScheme().toLowerCase(Locale.ROOT).startsWith("http")) {
             protocols.add(DataSourceType.URL);
             files.add(uri.toString());
           } else {
@@ -2746,7 +2708,7 @@ public class Desktop extends jalview.jbgui.GDesktop
 
       // resolve any .lnk files in the file drop
       for (int f = 0; f < files.size(); f++) {
-        String source = files.get(f).toString().toLowerCase();
+        String source = files.get(f).toString().toLowerCase(Locale.ROOT);
         if (protocols.get(f).equals(DataSourceType.FILE)
             && (source.endsWith(".lnk") || source.endsWith(".url") || source.endsWith(".site"))) {
           try {