Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 62344 invoked from network); 13 Oct 2009 06:45:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Oct 2009 06:45:54 -0000 Received: (qmail 59970 invoked by uid 500); 13 Oct 2009 06:45:54 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 59861 invoked by uid 500); 13 Oct 2009 06:45:53 -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 59851 invoked by uid 99); 13 Oct 2009 06:45:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 06:45:53 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2009 06:45:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5B713234C045 for ; Mon, 12 Oct 2009 23:45:31 -0700 (PDT) Message-ID: <2029367318.1255416331360.JavaMail.jira@brutus> Date: Mon, 12 Oct 2009 23:45:31 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (LANG-535) ClassUtils.getShortClassName() will not work with an array; it seems to add a semicolon to the end. In-Reply-To: <1990583142.1253649256303.JavaMail.jira@brutus> 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-535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-535: ------------------------------- Attachment: LANG-535.patch Attaching a patch that adds support for: * arrays * primitive arrays * multiple dimension arrays * Stops getPackageName using the underlying cls.getPackage().getName() after discovering java.lang.String[]'s getPackage to be null (at least within the Maven2/JUnit classloader). Plus various tests. > ClassUtils.getShortClassName() will not work with an array; it seems to add a semicolon to the end. > ---------------------------------------------------------------------------------------------------- > > Key: LANG-535 > URL: https://issues.apache.org/jira/browse/LANG-535 > Project: Commons Lang > Issue Type: Bug > Affects Versions: 2.4 > Environment: Java 1.4.2 > Reporter: mark juchems > Priority: Minor > Fix For: 3.0 > > Attachments: LANG-535.patch > > > A semicolon is introduced into the class name at the end for all arrays... > String sArray[] = new String[2]; > sArray[0] = "mark"; > sArray[1] = "is cool"; > String simpleString = "chris"; > > assertEquals("String", ClassUtils.getShortClassName(simpleString, null)); > assertEquals("String;", ClassUtils.getShortClassName(sArray, null)); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.