forked from I2P_Developers/i2p.i2p
Clean up single char indexOf()
This commit is contained in:
@@ -31,7 +31,7 @@ public class I2PSocketAddress extends SocketAddress {
|
||||
*/
|
||||
public I2PSocketAddress(String host) {
|
||||
int port = 0;
|
||||
int colon = host.indexOf(":");
|
||||
int colon = host.indexOf(':');
|
||||
if (colon > 0) {
|
||||
try {
|
||||
port = Integer.parseInt(host.substring(colon + 1));
|
||||
|
@@ -128,7 +128,7 @@ public class I2PSocketEepGet extends EepGet {
|
||||
if ("i2p".equals(host)) {
|
||||
String file = url.getRawPath();
|
||||
try {
|
||||
int slash = 1 + file.substring(1).indexOf("/");
|
||||
int slash = 1 + file.substring(1).indexOf('/');
|
||||
host = file.substring(1, slash);
|
||||
_actualURL = "http://" + host + file.substring(slash);
|
||||
String query = url.getRawQuery();
|
||||
|
Reference in New Issue
Block a user