X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=a64e86994d8cfa35add4fd6eb44fb9f4d518913e;hb=afe4b88500a5d61bc8d312909cfdde2b7cdd53df;hp=a44d474cc9bb54b722ab9c3d0dee2e30437549cd;hpb=5cdd99fc75ec12eda59f3f58719357bd4b019f73;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index a44d474..a64e869 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -54,6 +54,8 @@ import javax.swing.LookAndFeel; import javax.swing.UIManager; import jalview.analytics.Plausible; +import jalview.bin.argparser.Arg; +import jalview.bin.argparser.ArgParser; import jalview.datamodel.PDBEntry; import jalview.gui.Preferences; import jalview.gui.UserDefinedColours; @@ -1449,11 +1451,10 @@ public class Cache if (customProxySet && // we have a username but no password for the scheme being // requested - (protocol.equalsIgnoreCase("http") - && (httpUser != null - && httpUser.length() > 0 - && (httpPassword == null - || httpPassword.length == 0))) + (protocol.equalsIgnoreCase("http") + && (httpUser != null && httpUser.length() > 0 + && (httpPassword == null + || httpPassword.length == 0))) || (protocol.equalsIgnoreCase("https") && (httpsUser != null && httpsUser.length() > 0 @@ -1732,4 +1733,10 @@ public class Cache { return key == null ? null : sessionProperties.get(key); } + + public static boolean getArgCacheDefault(Arg a, String pref, boolean def) + { + ArgParser ap = Jalview.getInstance().getArgParser(); + return ap.isSet(a) ? ap.getBoolean(a) : getDefault(pref, def); + } }