From: James Procter Date: Tue, 24 Jan 2023 07:48:07 +0000 (+0000) Subject: JAL-629 don’t trash user’s system property file when adjusting settings to process... X-Git-Tag: Release_2_11_4_0~495 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=97708f316b561ec5f9f03d402945b522085b0d5b;p=jalview.git JAL-629 don’t trash user’s system property file when adjusting settings to process CL args --- diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 370a243..7ff7309 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -322,6 +322,16 @@ public class Cache private static boolean propsAreReadOnly = Platform.isJS(); + public static boolean isPropsAreReadOnly() + { + return propsAreReadOnly; + } + + public static void setPropsAreReadOnly(boolean propsAreReadOnly) + { + Cache.propsAreReadOnly = propsAreReadOnly; + } + private final static String JS_PROPERTY_PREFIX = "jalview_"; /** @@ -1401,10 +1411,11 @@ 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 diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 5b3e199..289d962 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -476,6 +476,10 @@ public class Commands } } } + // for moment we disable JSON export + Cache.setPropsAreReadOnly(true); + Cache.setProperty("EXPORT_EMBBED_BIOJSON", "false"); + switch (type) { case "svg":