Replace use of String.indexOf(String) for strings of length one with

indexOf(char)
This commit is contained in:
Gary Gregory 2017-12-06 09:29:06 -07:00
parent cca56bebe9
commit 9931a9ca94
2 changed files with 2 additions and 2 deletions

View File

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

View File

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