forked from I2P_Developers/i2p.i2p
dont use equalsIgnoreCase() for booleans
This commit is contained in:
@ -169,7 +169,7 @@ public class ConfigNetHandler extends FormHandler {
|
||||
String oldNPort = _context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_PORT, "");
|
||||
String oldAutoHost = _context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_AUTO_IP, "true");
|
||||
String sAutoPort = _context.getProperty(ConfigNetHelper.PROP_I2NP_NTCP_AUTO_PORT, "true");
|
||||
boolean oldAutoPort = "true".equalsIgnoreCase(sAutoPort);
|
||||
boolean oldAutoPort = Boolean.valueOf(sAutoPort).booleanValue();
|
||||
if (_ntcpHostname == null) _ntcpHostname = "";
|
||||
if (_ntcpPort == null) _ntcpPort = "";
|
||||
if (_ntcpAutoIP == null) _ntcpAutoIP = "true";
|
||||
|
@ -68,8 +68,8 @@ public class ConfigNetHelper extends HelperBase {
|
||||
}
|
||||
|
||||
public String getEnableTimeSyncChecked() {
|
||||
String disabled = _context.getProperty(Timestamper.PROP_DISABLED, "false");
|
||||
if ( (disabled != null) && ("true".equalsIgnoreCase(disabled)) )
|
||||
boolean disabled = _context.getBooleanProperty(Timestamper.PROP_DISABLED);
|
||||
if (disabled)
|
||||
return "";
|
||||
else
|
||||
return CHECKED;
|
||||
@ -77,7 +77,7 @@ public class ConfigNetHelper extends HelperBase {
|
||||
|
||||
/** @param prop must default to false */
|
||||
public String getChecked(String prop) {
|
||||
if (Boolean.valueOf(_context.getProperty(prop)).booleanValue())
|
||||
if (_context.getBooleanProperty(prop))
|
||||
return CHECKED;
|
||||
return "";
|
||||
}
|
||||
@ -130,7 +130,7 @@ public class ConfigNetHelper extends HelperBase {
|
||||
|
||||
/** default true */
|
||||
public String getUpnpChecked() {
|
||||
if (Boolean.valueOf(_context.getProperty(TransportManager.PROP_ENABLE_UPNP, "true")).booleanValue())
|
||||
if (_context.getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UPNP))
|
||||
return CHECKED;
|
||||
return "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user