JAL-1054 Change one more (unused) url.openStream to use the HttpUtils wrapper for...
authorBen Soares <b.soares@dundee.ac.uk>
Tue, 21 May 2024 17:02:14 +0000 (18:02 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Tue, 21 May 2024 17:02:14 +0000 (18:02 +0100)
src/jalview/bin/JalviewLite.java

index b73fffc..7e1296e 100644 (file)
  */
 package jalview.bin;
 
+import java.applet.Applet;
+import java.awt.Button;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.EventQueue;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.event.ActionEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
 import java.util.Locale;
+import java.util.StringTokenizer;
+import java.util.Vector;
 
 import jalview.analysis.AlignmentUtils;
 import jalview.api.StructureSelectionManagerProvider;
@@ -56,28 +76,6 @@ import jalview.structure.StructureSelectionManager;
 import jalview.util.ColorUtils;
 import jalview.util.HttpUtils;
 import jalview.util.MessageManager;
-
-import java.applet.Applet;
-import java.awt.Button;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.EventQueue;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.Graphics;
-import java.awt.event.ActionEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
 import netscape.javascript.JSObject;
 
 /**
@@ -1366,7 +1364,7 @@ public class JalviewLite extends Applet
         try
         {
           BufferedReader reader = new BufferedReader(
-                  new InputStreamReader(url.openStream()));
+                  new InputStreamReader(HttpUtils.openStream(url)));
           String line;
           while ((line = reader.readLine()) != null)
           {
@@ -2253,8 +2251,8 @@ public class JalviewLite extends Applet
         PDBEntry[] pdb = new PDBEntry[pdbs.size()];
         String[][] chains = new String[pdbs.size()][];
         String[] protocols = new String[pdbs.size()];
-        for (int pdbsi = 0, pdbsiSize = pdbs
-                .size(); pdbsi < pdbsiSize; pdbsi++)
+        for (int pdbsi = 0,
+                pdbsiSize = pdbs.size(); pdbsi < pdbsiSize; pdbsi++)
         {
           Object[] o = (Object[]) pdbs.elementAt(pdbsi);
           pdb[pdbsi] = (PDBEntry) o[0];