JAL-1026 - insert a sensible default for proxy so Jalview doesn't crash out immediatl...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 3 Oct 2012 09:47:27 +0000 (10:47 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 3 Oct 2012 09:47:27 +0000 (10:47 +0100)
src/jalview/bin/Cache.java

index b24304a..141470a 100755 (executable)
@@ -277,11 +277,14 @@ public class Cache
 
     if (getDefault("USE_PROXY", false))
     {
+      String proxyServer=getDefault("PROXY_SERVER", ""), proxyPort=getDefault("PROXY_PORT", "8080");
+      
       System.out.println("Using proxyServer: "
-              + getDefault("PROXY_SERVER", null) + " proxyPort: "
-              + getDefault("PROXY_PORT", null));
-      System.setProperty("http.proxyHost", getDefault("PROXY_SERVER", null));
-      System.setProperty("http.proxyPort", getDefault("PROXY_PORT", null));
+              + proxyServer + " proxyPort: "
+              + proxyPort );
+      
+      System.setProperty("http.proxyHost", proxyServer);
+      System.setProperty("http.proxyPort", proxyPort);
     }
 
     // LOAD THE AUTHORS FROM THE authors.props file