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 53E34200D19 for ; Fri, 22 Sep 2017 07:55:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 529041609EF; Fri, 22 Sep 2017 05:55:27 +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 99E451609E1 for ; Fri, 22 Sep 2017 07:55:26 +0200 (CEST) Received: (qmail 27676 invoked by uid 500); 22 Sep 2017 05:55:25 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 27665 invoked by uid 99); 22 Sep 2017 05:55:24 -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; Fri, 22 Sep 2017 05:55:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B5DD7F56E3; Fri, 22 Sep 2017 05:55:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Fri, 22 Sep 2017 05:55:24 -0000 Message-Id: <69a46e1513624e8a8fe990789c087dcc@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/11] lucenenet git commit: BUG: Lucene.Net.Support.StringExtensions.TrimEnd(): Fixed logic to correctly trim all of the elements if they are empty archived-at: Fri, 22 Sep 2017 05:55:27 -0000 Repository: lucenenet Updated Branches: refs/heads/master caa61a37d -> 2368a020d BUG: Lucene.Net.Support.StringExtensions.TrimEnd(): Fixed logic to correctly trim all of the elements if they are empty Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/713a645f Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/713a645f Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/713a645f Branch: refs/heads/master Commit: 713a645f8ff416e269ddaa4af3dc6697a0f0e0e1 Parents: a57d9f1 Author: Shad Storhaug Authored: Tue Sep 19 20:15:44 2017 +0700 Committer: Shad Storhaug Committed: Fri Sep 22 03:06:02 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net/Support/StringExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/713a645f/src/Lucene.Net/Support/StringExtensions.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/StringExtensions.cs b/src/Lucene.Net/Support/StringExtensions.cs index c051a60..8f99970 100644 --- a/src/Lucene.Net/Support/StringExtensions.cs +++ b/src/Lucene.Net/Support/StringExtensions.cs @@ -153,7 +153,7 @@ namespace Lucene.Net.Support if (!string.IsNullOrEmpty(input[lastElement])) break; } - if (lastElement > 0 && lastElement < input.Length) + if (lastElement >= -1 && lastElement < input.Length) { int end = lastElement + 1; string[] result = new string[end];