mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-10 12:05:58 +00:00
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 @@ private static String stripDotSuffix(final String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
final int index = value.indexOf(".");
|
||||
final int index = value.indexOf('.');
|
||||
if (index != -1) {
|
||||
return value.substring(0, index);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public AsyncPushConsumer get(final HttpRequest request) throws HttpException {
|
||||
return null;
|
||||
}
|
||||
String path = request.getPath();
|
||||
final int i = path.indexOf("?");
|
||||
final int i = path.indexOf('?');
|
||||
if (i != -1) {
|
||||
path = path.substring(0, i);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user