JAL-1460 temp variable for clearer conditional and some extra brackets for readabilit... bug/JAL-1460_dragndropWindows
authorJim Procter <jprocter@issues.jalview.org>
Fri, 25 May 2018 09:47:32 +0000 (10:47 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 25 May 2018 09:48:59 +0000 (10:48 +0100)
src/jalview/gui/Desktop.java

index 9d5cabd..8be4eac 100644 (file)
@@ -3471,7 +3471,10 @@ public class Desktop extends jalview.jbgui.GDesktop
       // resolve any .lnk files in the file drop
       for (int f = 0; f < files.size(); f++)
       {
-        if (protocols.get(f).equals(DataSourceType.FILE) && files.get(f).toLowerCase().endsWith(".lnk") || files.get(f).toLowerCase().endsWith(".url")|| files.get(f).toLowerCase().endsWith(".site"))
+        String source = files.get(f).toLowerCase();
+        if (protocols.get(f).equals(DataSourceType.FILE)
+                && (source.endsWith(".lnk") || source.endsWith(".url")
+                        || source.endsWith(".site")))
         {
           try {
             File lf = new File(files.get(f));