Clean up single char indexOf()

This commit is contained in:
zzz
2016-12-02 18:52:37 +00:00
parent 5b31540fe8
commit 5be077e25d
29 changed files with 51 additions and 51 deletions

View File

@@ -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));

View File

@@ -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();