hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject httpcomponents-core git commit: Replace use of String.indexOf(String) for strings of length one with indexOf(char)
Date Wed, 06 Dec 2017 16:27:58 GMT
Repository: httpcomponents-core
Updated Branches:
  refs/heads/master c81801f8a -> 3ef097ca9


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

Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/3ef097ca
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/3ef097ca
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/3ef097ca

Branch: refs/heads/master
Commit: 3ef097ca95f13b76fd950f361723f9918950ccbc
Parents: c81801f
Author: Gary Gregory <ggregory@apache.org>
Authored: Wed Dec 6 09:27:57 2017 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Wed Dec 6 09:27:57 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hc/core5/http/protocol/RequestHandlerRegistry.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3ef097ca/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestHandlerRegistry.java
----------------------------------------------------------------------
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestHandlerRegistry.java
b/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestHandlerRegistry.java
index 935d3a9..3475427 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestHandlerRegistry.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/RequestHandlerRegistry.java
@@ -104,7 +104,7 @@ public class RequestHandlerRegistry<T> implements HttpRequestMapper<T>
{
             throw new MisdirectedRequestException("Not authoritative");
         }
         String path = request.getPath();
-        final int i = path.indexOf("?");
+        final int i = path.indexOf('?');
         if (i != -1) {
             path = path.substring(0, i);
         }


Mime
View raw message