diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java index dafc5ba8457441995f63076c2b736643af2359bc..7b284d4af57d9becae0e30ce5155dd7a711b5320 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java @@ -868,7 +868,7 @@ public class TunnelController implements Logging { } if (type.equals(TYPE_HTTP_SERVER) || type.equals(TYPE_STREAMR_SERVER)) { String tgzip = _config.getProperty(PROP_TUN_GZIP); - if (tgzip == null || Boolean.valueOf(tgzip)) { + if (tgzip == null || Boolean.parseBoolean(tgzip)) { // Web server will gzip // If web server doesn't gzip, I2PTunnelHTTPServer will. // Streaming will force gzip on first packet for header compression, @@ -933,7 +933,7 @@ public class TunnelController implements Logging { } } if (isClient(type) && - (type.equals(TYPE_HTTP_CLIENT) || Boolean.valueOf(_config.getProperty(PROP_SHARED, "false")))) { + (type.equals(TYPE_HTTP_CLIENT) || Boolean.parseBoolean(_config.getProperty(PROP_SHARED)))) { // migration: HTTP proxy and shared clients default to both if (!_config.containsKey(OPT_ENCTYPE)) _config.setProperty(OPT_ENCTYPE, "4,0"); diff --git a/apps/i2ptunnel/jsp/wizard.jsp b/apps/i2ptunnel/jsp/wizard.jsp index 86aef306d6194aa52639562e70b81c25d420fe33..568fd2f164b177e9d37c7ced6e2118c3fc6c1b27 100644 --- a/apps/i2ptunnel/jsp/wizard.jsp +++ b/apps/i2ptunnel/jsp/wizard.jsp @@ -29,7 +29,7 @@ curPage = 1; } /* Fetch and format a couple of regularly-used values */ - boolean tunnelIsClient = Boolean.valueOf(request.getParameter("isClient")); + boolean tunnelIsClient = Boolean.parseBoolean(request.getParameter("isClient")); String tunnelType = request.getParameter("type"); tunnelType = net.i2p.data.DataHelper.stripHTML(tunnelType); /* Special case - don't display page 4 for server tunnels */ diff --git a/apps/jetty/java/src/net/i2p/servlet/util/JspC.java b/apps/jetty/java/src/net/i2p/servlet/util/JspC.java index 6ca591342aa9a17e61c747dfac3676f60f2667ea..6b6b8833366b909b3eac141f456a96c291e96980 100644 --- a/apps/jetty/java/src/net/i2p/servlet/util/JspC.java +++ b/apps/jetty/java/src/net/i2p/servlet/util/JspC.java @@ -42,10 +42,10 @@ public class JspC { private static final String THREADS_VERSION_8 = "8.5.33"; private static final String THREADS_VERSION_9 = "9.0.11"; // if true, try to make web.xml reproducible - private static final boolean REPRODUCIBLE = Boolean.valueOf(System.getProperty("build.reproducible")); + private static final boolean REPRODUCIBLE = Boolean.parseBoolean(System.getProperty("build.reproducible")); // if true, we must get the Tomcat version out of the jasper jar's manifest - private static final boolean SYSTEM_TOMCAT = Boolean.valueOf(System.getProperty("with-libtomcat8-java")) || - Boolean.valueOf(System.getProperty("with-libtomcat9-java")); + private static final boolean SYSTEM_TOMCAT = Boolean.parseBoolean(System.getProperty("with-libtomcat8-java")) || + Boolean.parseBoolean(System.getProperty("with-libtomcat9-java")); // path to the jasper jar private static final String JASPER_JAR = System.getProperty("jasper.jar"); diff --git a/apps/routerconsole/java/src/net/i2p/router/update/PluginUpdateRunner.java b/apps/routerconsole/java/src/net/i2p/router/update/PluginUpdateRunner.java index b4f6d10e4e62e32d0d036e8384832d13d5c008fc..2c840980d67cec7244b640c67f069419c0729b6b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/update/PluginUpdateRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/update/PluginUpdateRunner.java @@ -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(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java index 3464f678381701589d681ed4c5db5c33c83bda89..be358159116cb93d8bb46e86c0b03e639ccf3df1 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigServiceHandler.java @@ -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); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/HostCheckHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/HostCheckHandler.java index 90d9c76b07541e37e753144e28873722ae257870..fcda30f56528e3c562f128d29b4590d99ff625cc 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/HostCheckHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/HostCheckHandler.java @@ -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); diff --git a/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java b/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java index 2835a79690dff746cacbe1490d97807d975b3308..29d641ae6d4a53678cf4e8fb928fcea95b000580 100644 --- a/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java +++ b/apps/susidns/src/java/src/i2p/susi/dns/AddressBean.java @@ -205,7 +205,7 @@ public class AddressBean /** @since 0.9.26 */ public boolean isValidated() { - return Boolean.valueOf(getProp("v")); + return Boolean.parseBoolean(getProp("v")); } /** @since 0.8.7 */ diff --git a/core/java/src/net/i2p/util/Addresses.java b/core/java/src/net/i2p/util/Addresses.java index 79347a6f5e63b061b1d450baf3af56d6e7af2ec8..0e15bb0fe9227c3af23a48682317d08b576c12ee 100644 --- a/core/java/src/net/i2p/util/Addresses.java +++ b/core/java/src/net/i2p/util/Addresses.java @@ -991,7 +991,7 @@ public abstract class Addresses { */ private static String getPrivacyStatus() { String rv = useIPv6TempAddresses(); - if (Boolean.valueOf(rv)) { + if (Boolean.parseBoolean(rv)) { long pref = getLong("/proc/sys/net/ipv6/conf/all/temp_prefered_lft"); if (pref > 0) rv += ", preferred lifetime " + DataHelper.formatDuration(pref * 1000); diff --git a/core/java/src/net/i2p/util/SystemVersion.java b/core/java/src/net/i2p/util/SystemVersion.java index a2552109a339a1dc664ad6e73d737f9b344b43e4..1ab94eff88170caa0760b44318e42688411e2dbd 100644 --- a/core/java/src/net/i2p/util/SystemVersion.java +++ b/core/java/src/net/i2p/util/SystemVersion.java @@ -44,7 +44,7 @@ public abstract class SystemVersion { private static final boolean _hasWrapper = System.getProperty("wrapper.version") != null; private static final boolean _isLinuxService; // found in Tanuki WrapperManager source so we don't need the WrapperManager class here - private static final boolean _isWindowsService = _isWin && _hasWrapper && Boolean.valueOf(System.getProperty("wrapper.service")); + private static final boolean _isWindowsService = _isWin && _hasWrapper && Boolean.parseBoolean(System.getProperty("wrapper.service")); private static final boolean _isService; private static final boolean _isSlow; diff --git a/router/java/src/net/i2p/router/transport/TransportManager.java b/router/java/src/net/i2p/router/transport/TransportManager.java index 5237ea4ac214bb1bf00ebbfac23d9200765ffca1..84516eccf8e0ea011908b07fc8754a01ed4e61e3 100644 --- a/router/java/src/net/i2p/router/transport/TransportManager.java +++ b/router/java/src/net/i2p/router/transport/TransportManager.java @@ -143,7 +143,7 @@ public class TransportManager implements TransportEventListener { System.out.println(msg); _log.logAlways(Log.WARN, msg); rv = true; - } else if (!SystemVersion.isMac() && Boolean.valueOf(System.getProperty(PROP_JAVA_PROXY2))) { + } else if (!SystemVersion.isMac() && Boolean.parseBoolean(System.getProperty(PROP_JAVA_PROXY2))) { try { // Use ProxySelector to see if we would be proxied // using a dummy address. @@ -313,7 +313,7 @@ public class TransportManager implements TransportEventListener { Set<String> ipset = Addresses.getAddresses(_context.getBooleanProperty("i2np.allowLocal"), false, true); String lastv4 = _context.getProperty(UDPTransport.PROP_IP); String lastv6 = _context.getProperty(UDPTransport.PROP_IPV6); - boolean preferTemp = Boolean.valueOf(Addresses.useIPv6TempAddresses()); + boolean preferTemp = Boolean.parseBoolean(Addresses.useIPv6TempAddresses()); // // Avoid IPv6 temporary addresses if we have a non-temporary one, // unless the kernel prefers them