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 C90B09527 for ; Mon, 8 Oct 2012 21:46:03 +0000 (UTC) Received: (qmail 31290 invoked by uid 500); 8 Oct 2012 21:46:03 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 31167 invoked by uid 500); 8 Oct 2012 21:46:03 -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 31157 invoked by uid 99); 8 Oct 2012 21:46:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Oct 2012 21:46:03 +0000 Date: Mon, 8 Oct 2012 21:46:03 +0000 (UTC) From: "John Lindwall (JIRA)" To: issues@commons.apache.org Message-ID: <1727406816.11115.1349732763213.JavaMail.jiratomcat@arcas> In-Reply-To: <780082468.11098.1349732642894.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (LANG-844) StringUtils.center() methods have inaccurate examples in javadocs 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-844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] John Lindwall updated LANG-844: ------------------------------- Attachment: StringUtils_Javadoc_Errors_In_Center.patch A patch for the bug. Fixes the javadoc comments in StringUtil so that the examples provided are correct. No new unit test added, since the examples are already present in the existing unit test. > StringUtils.center() methods have inaccurate examples in javadocs > ----------------------------------------------------------------- > > Key: LANG-844 > URL: https://issues.apache.org/jira/browse/LANG-844 > Project: Commons Lang > Issue Type: Bug > Components: lang.* > Affects Versions: 3.1, 2.x > Reporter: John Lindwall > Priority: Minor > Attachments: StringUtils_Javadoc_Errors_In_Center.patch > > > The javadoc comments for two of the center() methods in StringUtils.java have incorrect examples of the method's behavior. > In both instances the method is shown to behave thusly: > StringUtils.center("ab", 4, ' ') = " ab" > when in fact it produces the result " ab " (note the extra space at the end). > The methods affected: > 1. public static String center(String str, int size, char padChar) > 2. public static String center(String str, int size, String padStr) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira