Replace use of String.indexOf(String) for strings of length one with
indexOf(char)
This commit is contained in:
parent
cca56bebe9
commit
9931a9ca94
|
@ -186,7 +186,7 @@ public class NTCredentials implements Credentials, Serializable {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final int index = value.indexOf(".");
|
final int index = value.indexOf('.');
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
return value.substring(0, index);
|
return value.substring(0, index);
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ class AsyncPushConsumerRegistry {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String path = request.getPath();
|
String path = request.getPath();
|
||||||
final int i = path.indexOf("?");
|
final int i = path.indexOf('?');
|
||||||
if (i != -1) {
|
if (i != -1) {
|
||||||
path = path.substring(0, i);
|
path = path.substring(0, i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue