forked from I2P_Developers/i2p.i2p
Clean up single char indexOf()
This commit is contained in:
@ -958,7 +958,7 @@ public class TrackerClient implements Runnable {
|
||||
{
|
||||
announce = a;
|
||||
String s = a.substring(7);
|
||||
host = s.substring(0, s.indexOf("/"));
|
||||
host = s.substring(0, s.indexOf('/'));
|
||||
isPrimary = p;
|
||||
interval = INITIAL_SLEEP;
|
||||
}
|
||||
|
@ -1466,7 +1466,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String fullBasename = basename;
|
||||
if (basename.length() > MAX_DISPLAYED_FILENAME_LENGTH) {
|
||||
String start = basename.substring(0, MAX_DISPLAYED_FILENAME_LENGTH);
|
||||
if (start.indexOf(" ") < 0 && start.indexOf("-") < 0) {
|
||||
if (start.indexOf(' ') < 0 && start.indexOf('-') < 0) {
|
||||
// browser has nowhere to break it
|
||||
basename = start + HELLIP;
|
||||
}
|
||||
@ -3086,7 +3086,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
: tx + ": " + directory);
|
||||
if (showSort)
|
||||
buf.append("</a>");
|
||||
int dirSlash = directory.indexOf("/");
|
||||
int dirSlash = directory.indexOf('/');
|
||||
if (dirSlash > 0) {
|
||||
buf.append(" ");
|
||||
buf.append(DataHelper.escapeHTML(directory.substring(dirSlash + 1)));
|
||||
|
@ -96,7 +96,7 @@ public class InclusiveByteRange
|
||||
long first = -1;
|
||||
long last = -1;
|
||||
int d = t.indexOf('-');
|
||||
if (d < 0 || t.indexOf("-",d + 1) >= 0)
|
||||
if (d < 0 || t.indexOf('-',d + 1) >= 0)
|
||||
{
|
||||
if ("bytes".equals(t))
|
||||
continue;
|
||||
|
@ -105,7 +105,7 @@ class MimeTypes
|
||||
int i=-1;
|
||||
while(type==null)
|
||||
{
|
||||
i=filename.indexOf(".",i+1);
|
||||
i=filename.indexOf('.',i+1);
|
||||
|
||||
if (i<0 || i>=filename.length())
|
||||
break;
|
||||
|
Reference in New Issue
Block a user