Merge branch 'improvement/JAL-4409_implement_extra_schemes_in_getdown' into develop
[jalview.git] / src / jalview / util / ChannelProperties.java
index c4c083f..ffcb6a1 100644 (file)
@@ -86,8 +86,8 @@ public class ChannelProperties
     if (channelPropsURL == null)
     {
       // complete failure of channel_properties, set all properties to defaults
-      jalview.bin.Console.errPrintln("Failed to find '/"
-              + CHANNEL_PROPERTIES_FILENAME + "' file at '"
+      ErrorLog.errPrintln("Failed to find '/" + CHANNEL_PROPERTIES_FILENAME
+              + "' file at '"
               + (channelPropsURL == null ? "null"
                       : channelPropsURL.toString())
               + "'. Using class defaultProps.");
@@ -97,12 +97,12 @@ public class ChannelProperties
     {
       try
       {
-        InputStream channelPropsIS = channelPropsURL.openStream();
+        InputStream channelPropsIS = HttpUtils.openStream(channelPropsURL);
         tryChannelProps.load(channelPropsIS);
         channelPropsIS.close();
       } catch (IOException e)
       {
-        jalview.bin.Console.errPrintln(e.getMessage());
+        ErrorLog.errPrintln(e.getMessage());
         // return false;
       }
     }
@@ -157,10 +157,10 @@ public class ChannelProperties
         channelProps.load(is);
       } catch (FileNotFoundException e)
       {
-        jalview.bin.Console.errPrintln(e.getMessage());
+        ErrorLog.errPrintln(e.getMessage());
       } catch (IOException e)
       {
-        jalview.bin.Console.errPrintln(e.getMessage());
+        ErrorLog.errPrintln(e.getMessage());
       }
     }
   }
@@ -214,8 +214,7 @@ public class ChannelProperties
       }
       else
       {
-        jalview.bin.Console
-                .errPrintln("Failed to get channel property '" + key + "'");
+        ErrorLog.errPrintln("Failed to get channel property '" + key + "'");
       }
     }
     return null;
@@ -267,7 +266,7 @@ public class ChannelProperties
       img = imgIcon == null ? null : imgIcon.getImage();
       if (img == null)
       {
-        jalview.bin.Console.errPrintln(
+        ErrorLog.errPrintln(
                 "Failed to load channel image " + key + "=" + path);
         if (!useClassDefaultImage)
         {
@@ -294,7 +293,7 @@ public class ChannelProperties
       {
         return urlMap().getOrDefault(key, null);
       }
-      jalview.bin.Console.errPrintln(
+      ErrorLog.errPrintln(
               "Do not use getImageURL(key) before using getImage(key...)");
     }
     return null;