Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 97443 invoked from network); 8 Jul 2009 06:46:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jul 2009 06:46:27 -0000 Received: (qmail 84460 invoked by uid 500); 8 Jul 2009 06:46:37 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 84356 invoked by uid 500); 8 Jul 2009 06:46:37 -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 84346 invoked by uid 99); 8 Jul 2009 06:46:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 06:46:37 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jul 2009 06:46:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C9C92234C004 for ; Tue, 7 Jul 2009 23:46:14 -0700 (PDT) Message-ID: <238982256.1247035574811.JavaMail.jira@brutus> Date: Tue, 7 Jul 2009 23:46:14 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Closed: (LANG-513) Better EnumUtils In-Reply-To: <379490276.1246999214803.JavaMail.jira@brutus> 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-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell closed LANG-513. ------------------------------ Resolution: Fixed Thanks for the patch Ivan. Applied. svn ci -m "Applying Ivan Bilenjkij's patch from LANG-513, improving the generics of the getEnumMap method" src Sending src/java/org/apache/commons/lang/EnumUtils.java Sending src/test/org/apache/commons/lang/EnumUtilsTest.java Transmitting file data .. Committed revision 792051. > Better EnumUtils > ---------------- > > Key: LANG-513 > URL: https://issues.apache.org/jira/browse/LANG-513 > Project: Commons Lang > Issue Type: Improvement > Affects Versions: 3.0 > Reporter: Ivan Bilenjkij > Fix For: 3.0 > > Attachments: EnumUtils.patch, EnumUtilsTest.patch > > > Parametrize the getEnumMap() method with >. This narrows down the argument so that non-enums and {{null}} are rejected at compile time. Also, at its current state the EnumUtils should never be instantiated. > {code:title=EnumUtils.java} public static Map> getEnumMap(Class enumClass) {code} > changes to: > {code:title=EnumUtils.java} public static > Map> getEnumMap(Class enumClass) {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.