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.
This commit is contained in:
@@ -36,7 +36,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
|
|||||||
* Parses and provide access to the information contained in the <code>getdown.txt</code>
|
* Parses and provide access to the information contained in the <code>getdown.txt</code>
|
||||||
* configuration file.
|
* configuration file.
|
||||||
*/
|
*/
|
||||||
public final class Application
|
public class Application
|
||||||
{
|
{
|
||||||
/** The name of our configuration file. */
|
/** The name of our configuration file. */
|
||||||
public static final String CONFIG_FILE = "getdown.txt";
|
public static final String CONFIG_FILE = "getdown.txt";
|
||||||
@@ -261,7 +261,7 @@ public final class Application
|
|||||||
_appdir = appdir;
|
_appdir = appdir;
|
||||||
_appid = appid;
|
_appid = appid;
|
||||||
_signers = (signers == null) ? Collections.<Certificate>emptyList() : signers;
|
_signers = (signers == null) ? Collections.<Certificate>emptyList() : signers;
|
||||||
_config = getLocalPath(CONFIG_FILE);
|
_config = getLocalPath(appdir, CONFIG_FILE);
|
||||||
_extraJvmArgs = (jvmargs == null) ? EMPTY_STRING_ARRAY : jvmargs;
|
_extraJvmArgs = (jvmargs == null) ? EMPTY_STRING_ARRAY : jvmargs;
|
||||||
_extraAppArgs = (appargs == null) ? EMPTY_STRING_ARRAY : appargs;
|
_extraAppArgs = (appargs == null) ? EMPTY_STRING_ARRAY : appargs;
|
||||||
}
|
}
|
||||||
@@ -783,7 +783,7 @@ public final class Application
|
|||||||
*/
|
*/
|
||||||
public File getLocalPath (String path)
|
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 File _appdir;
|
||||||
protected String _appid;
|
protected String _appid;
|
||||||
protected File _config;
|
protected File _config;
|
||||||
|
|||||||
Reference in New Issue
Block a user