forked from I2P_Developers/i2p.i2p
Boolean.valueOf() -> Boolean.parseBoolean()
This commit is contained in:
@@ -441,7 +441,7 @@ class PluginUpdateRunner extends UpdateRunner {
|
||||
boolean wasRunning = false;
|
||||
File destDir = new SecureDirectory(appDir, appName);
|
||||
if (destDir.exists()) {
|
||||
if (Boolean.valueOf(props.getProperty("install-only")).booleanValue()) {
|
||||
if (Boolean.parseBoolean(props.getProperty("install-only"))) {
|
||||
to.delete();
|
||||
statusDone("<b>" + _t("Downloaded plugin is for new installs only, but the plugin is already installed", url) + "</b>");
|
||||
return;
|
||||
@@ -517,7 +517,7 @@ class PluginUpdateRunner extends UpdateRunner {
|
||||
return;
|
||||
}
|
||||
// do we defer extraction and installation?
|
||||
if (Boolean.valueOf(props.getProperty("router-restart-required")).booleanValue()) {
|
||||
if (Boolean.parseBoolean(props.getProperty("router-restart-required"))) {
|
||||
// Yup!
|
||||
try {
|
||||
if(!FileUtil.copy(to, (new SecureFile( new SecureFile(appDir.getCanonicalPath() +"/" + appName +"/"+ ZIP).getCanonicalPath())) , true, true)) {
|
||||
@@ -548,7 +548,7 @@ class PluginUpdateRunner extends UpdateRunner {
|
||||
}
|
||||
update = true;
|
||||
} else {
|
||||
if (Boolean.valueOf(props.getProperty("update-only")).booleanValue()) {
|
||||
if (Boolean.parseBoolean(props.getProperty("update-only"))) {
|
||||
to.delete();
|
||||
statusDone("<b>" + _t("Plugin is for upgrades only, but the plugin is not installed") + ". " + appName + ' ' + version + "</b>");
|
||||
return;
|
||||
@@ -569,7 +569,7 @@ class PluginUpdateRunner extends UpdateRunner {
|
||||
_updated = true;
|
||||
to.delete();
|
||||
// install != update. Changing the user's settings like this is probabbly a bad idea.
|
||||
if (Boolean.valueOf( props.getProperty("dont-start-at-install")).booleanValue()) {
|
||||
if (Boolean.parseBoolean( props.getProperty("dont-start-at-install"))) {
|
||||
statusDone("<b>" + _t("Plugin {0} installed", appName + ' ' + version) + "</b>");
|
||||
if(!update) {
|
||||
Properties pluginProps = PluginStarter.pluginProperties();
|
||||
|
||||
@@ -389,7 +389,7 @@ public class ConfigServiceHandler extends FormHandler {
|
||||
}
|
||||
} else if (enable) {
|
||||
// already set to true, GraphicsEnvironment initialized, can't change it now
|
||||
if (Boolean.valueOf(System.getProperty("java.awt.headless"))) {
|
||||
if (Boolean.parseBoolean(System.getProperty("java.awt.headless"))) {
|
||||
addFormError(_t("Restart required to take effect"));
|
||||
} else {
|
||||
dtg = new net.i2p.desktopgui.Main(_context, mgr, null);
|
||||
|
||||
@@ -106,7 +106,7 @@ public class HostCheckHandler extends GzipHandler
|
||||
int httpsPort = _portMapper.getPort(PortMapper.SVC_HTTPS_CONSOLE);
|
||||
if (httpsPort > 0 && httpRequest.getLocalPort() != httpsPort) {
|
||||
String redir = _context.getProperty(PROP_REDIRECT);
|
||||
if (Boolean.valueOf(redir) ||
|
||||
if (Boolean.parseBoolean(redir) ||
|
||||
(redir == null && "1".equals(httpRequest.getHeader("Upgrade-Insecure-Requests")))) {
|
||||
sendRedirect(httpsPort, httpRequest, httpResponse);
|
||||
baseRequest.setHandled(true);
|
||||
|
||||
Reference in New Issue
Block a user