Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 66968200D4F for ; Wed, 6 Dec 2017 17:28:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 651E0160C08; Wed, 6 Dec 2017 16:28:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id ABF9B160BFD for ; Wed, 6 Dec 2017 17:27:59 +0100 (CET) Received: (qmail 41640 invoked by uid 500); 6 Dec 2017 16:27:58 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 41631 invoked by uid 99); 6 Dec 2017 16:27:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2017 16:27:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C6320E04F1; Wed, 6 Dec 2017 16:27:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ggregory@apache.org To: commits@hc.apache.org Message-Id: <29fabf38c97d4391bcc4d9953589efb3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: httpcomponents-core git commit: Replace use of String.indexOf(String) for strings of length one with indexOf(char) Date: Wed, 6 Dec 2017 16:27:58 +0000 (UTC) archived-at: Wed, 06 Dec 2017 16:28:00 -0000 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 Authored: Wed Dec 6 09:27:57 2017 -0700 Committer: Gary Gregory 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 implements HttpRequestMapper { 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); }