X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCache.java;h=b6315f36ac4e802c9dae6beb18cf928446ba6e80;hb=5b71a6118bcde0e76c959ed06f6736ea207de040;hp=83bc810836d2870dc0d1ab4fecccfe2f90a92d42;hpb=b483c2012e40cab4b38f650dc049c94efe7e27c2;p=jalview.git diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 83bc810..b6315f3 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -286,7 +286,8 @@ public class Cache /** Default file is ~/.jalview_properties */ static String propertiesFile; - private static boolean propsAreReadOnly = false; + private static boolean propsAreReadOnly = /** @j2sNative true || */ + false; public static void initLogger() { @@ -397,7 +398,8 @@ public class Cache // LOAD THE AUTHORS FROM THE authors.props file try { - String authorDetails = "jar:" + String authorDetails = /** @j2sNative "xxx" || */ + "jar:" .concat(Cache.class.getProtectionDomain().getCodeSource() .getLocation().toString().concat("!/authors.props")); @@ -419,7 +421,8 @@ public class Cache // VERSION MAY HAVE CHANGED SINCE LAST USING JALVIEW try { - String buildDetails = "jar:".concat(Cache.class.getProtectionDomain() + String buildDetails = /** @j2sNative "xxx" || */ + "jar:".concat(Cache.class.getProtectionDomain() .getCodeSource().getLocation().toString() .concat("!/.build_properties")); @@ -601,18 +604,13 @@ public class Cache } /** - * These methods are used when checking if the saved preference is different - * to the default setting + * Answers the value of the given property, or the supplied default value if + * the property is not set */ public static String getDefault(String property, String def) { - String string = getProperty(property); - if (string != null) - { - return string; - } - - return def; + String value = getProperty(property); + return value == null ? def : value; } /**