Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 94188 invoked from network); 18 Jan 2011 02:51:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2011 02:51:08 -0000 Received: (qmail 46320 invoked by uid 500); 18 Jan 2011 02:51:08 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 46223 invoked by uid 500); 18 Jan 2011 02:51:07 -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 46215 invoked by uid 99); 18 Jan 2011 02:51:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 02:51:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 02:51:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0I2ohbB027223 for ; Tue, 18 Jan 2011 02:50:43 GMT Message-ID: <18804254.26891295319043949.JavaMail.jira@thor> Date: Mon, 17 Jan 2011 21:50:43 -0500 (EST) From: "Paul Benedict (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-673) WordUtils.abbreviate() throws undocumented StringIndexOutOfBoundsException In-Reply-To: <11599985.26881295319043383.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LANG-673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982990#action_12982990 ] Paul Benedict commented on LANG-673: ------------------------------------ The error happens in line 627: {code}result.append(str.substring(0, upper));{code} > WordUtils.abbreviate() throws undocumented StringIndexOutOfBoundsException > -------------------------------------------------------------------------- > > Key: LANG-673 > URL: https://issues.apache.org/jira/browse/LANG-673 > Project: Commons Lang > Issue Type: Improvement > Affects Versions: 2.5 > Reporter: Paul Benedict > Fix For: 3.0 > > > The javadoc does not indicate that the string must already be long enough to abbreviate; yet it really does or an Exception is thrown. For example, if you try to abbreviate a string of length 10 at 40 characters, this will fail. I believe this should be allowed... just without any abbreviation. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.