Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 313E710F58 for ; Tue, 28 Apr 2015 15:35:16 +0000 (UTC) Received: (qmail 79799 invoked by uid 500); 28 Apr 2015 15:35:06 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 79695 invoked by uid 500); 28 Apr 2015 15:35:06 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 79684 invoked by uid 99); 28 Apr 2015 15:35:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 15:35:06 +0000 Date: Tue, 28 Apr 2015 15:35:06 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1118) StringUtils.repeat('z', -1) throws NegativeArraySizeException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-1118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14517216#comment-14517216 ] ASF GitHub Bot commented on LANG-1118: -------------------------------------- GitHub user rikles opened a pull request: https://github.com/apache/commons-lang/pull/72 LANG-1118: Fix StringUtils.repeat(char, int) _Close PR #68. Recreated due to rebase on master._ Now doing what is said in JavaDoc comment : when passing a negative repeat value to the *StringUtils.repeat(char, int)* function, it returns an empty String instead of throwing a _NegativeArraySizeException_. You can merge this pull request into a Git repository by running: $ git pull https://github.com/rikles/commons-lang fix-LANG-1118 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-lang/pull/72.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #72 ---- commit 78b30f509834d81b8814d46471b75e3167a6460f Author: Loic Guibert Date: 2015-04-23T11:41:51Z LANG-1118 Fix StringUtils.repeat(char, int) dealing with negative repeat value commit 9cc91332ff252f6e3f41719526f930dcb5908c31 Author: Loic Guibert Date: 2015-04-23T11:43:21Z LANG-1118 Adding a test case for StringUtils.repeat(String, int) checking dealing with negative repeat value ---- > StringUtils.repeat('z', -1) throws NegativeArraySizeException > ------------------------------------------------------------- > > Key: LANG-1118 > URL: https://issues.apache.org/jira/browse/LANG-1118 > Project: Commons Lang > Issue Type: Bug > Components: lang.* > Reporter: Loic Guibert > Assignee: Benedikt Ritter > Priority: Minor > > Unlike what is said in JavaDoc comment, when passing a negative repeat value to the *StringUtils.repeat(char, int)* function, it doesn't return an empty String but throws a _NegativeArraySizeException_. -- This message was sent by Atlassian JIRA (v6.3.4#6332)