From d6e1dba2c92537d31241722e9e3c0951fa765c17 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 14 Sep 2018 14:14:09 -0700 Subject: [PATCH] Plug Application constructor hole differently. I can imagine scenarios where someone might legitimately want to extend Application, so I'd rather not close off that avenue completely. --- .../java/com/threerings/getdown/data/Application.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/threerings/getdown/data/Application.java b/core/src/main/java/com/threerings/getdown/data/Application.java index 3cbf6af..af745fb 100644 --- a/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/core/src/main/java/com/threerings/getdown/data/Application.java @@ -36,7 +36,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; * Parses and provide access to the information contained in the getdown.txt * configuration file. */ -public final class Application +public class Application { /** The name of our configuration file. */ public static final String CONFIG_FILE = "getdown.txt"; @@ -261,7 +261,7 @@ public final class Application _appdir = appdir; _appid = appid; _signers = (signers == null) ? Collections.emptyList() : signers; - _config = getLocalPath(CONFIG_FILE); + _config = getLocalPath(appdir, CONFIG_FILE); _extraJvmArgs = (jvmargs == null) ? EMPTY_STRING_ARRAY : jvmargs; _extraAppArgs = (appargs == null) ? EMPTY_STRING_ARRAY : appargs; } @@ -783,7 +783,7 @@ public final class Application */ public File getLocalPath (String path) { - return new File(_appdir, path); + return getLocalPath(_appdir, path); } /** @@ -1699,6 +1699,11 @@ public final class Application } } + protected File getLocalPath (File appdir, String path) + { + return new File(appdir, path); + } + protected File _appdir; protected String _appid; protected File _config;