You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by gg...@apache.org on 2017/12/06 16:29:08 UTC

httpcomponents-client git commit: Replace use of String.indexOf(String) for strings of length one with indexOf(char)

Repository: httpcomponents-client
Updated Branches:
  refs/heads/master cca56bebe -> 9931a9ca9


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

Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/9931a9ca
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/9931a9ca
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/9931a9ca

Branch: refs/heads/master
Commit: 9931a9ca941b0d69ad68c437c6415cb262af7c3f
Parents: cca56be
Author: Gary Gregory <gg...@apache.org>
Authored: Wed Dec 6 09:29:06 2017 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Wed Dec 6 09:29:06 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hc/client5/http/auth/NTCredentials.java   | 2 +-
 .../hc/client5/http/impl/async/AsyncPushConsumerRegistry.java      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/9931a9ca/httpclient5/src/main/java/org/apache/hc/client5/http/auth/NTCredentials.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/auth/NTCredentials.java b/httpclient5/src/main/java/org/apache/hc/client5/http/auth/NTCredentials.java
index e9698bb..7c56c80 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/auth/NTCredentials.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/auth/NTCredentials.java
@@ -186,7 +186,7 @@ public class NTCredentials implements Credentials, Serializable {
         if (value == null) {
             return null;
         }
-        final int index = value.indexOf(".");
+        final int index = value.indexOf('.');
         if (index != -1) {
             return value.substring(0, index);
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/9931a9ca/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncPushConsumerRegistry.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncPushConsumerRegistry.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncPushConsumerRegistry.java
index 6704869..f5b8035 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncPushConsumerRegistry.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncPushConsumerRegistry.java
@@ -69,7 +69,7 @@ class AsyncPushConsumerRegistry {
             return null;
         }
         String path = request.getPath();
-        final int i = path.indexOf("?");
+        final int i = path.indexOf('?');
         if (i != -1) {
             path = path.substring(0, i);
         }