Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 35224 invoked from network); 7 Nov 2007 15:38:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2007 15:38:16 -0000 Received: (qmail 25518 invoked by uid 500); 7 Nov 2007 15:38:02 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 25457 invoked by uid 500); 7 Nov 2007 15:38:01 -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 25448 invoked by uid 99); 7 Nov 2007 15:38:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 07:38:01 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 15:38:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EAAD5714233 for ; Wed, 7 Nov 2007 07:37:50 -0800 (PST) Message-ID: <15272461.1194449870958.JavaMail.jira@brutus> Date: Wed, 7 Nov 2007 07:37:50 -0800 (PST) From: "Paul Benedict (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-331) Fix for LANG-259 broke ValuedEnum.compareTo() on subclassed enumerations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LANG-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540770 ] Paul Benedict commented on LANG-331: ------------------------------------ I do not believe that you should be able to inherit enum constants. Only the final concrete class should be able to have them. That seems to be the direction of the JDK, and I recommend the fix be comparable. There's a whole discussion on this topic here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6570766 > Fix for LANG-259 broke ValuedEnum.compareTo() on subclassed enumerations > ------------------------------------------------------------------------ > > Key: LANG-331 > URL: https://issues.apache.org/jira/browse/LANG-331 > Project: Commons Lang > Issue Type: Bug > Reporter: Michael Sclafani > Fix For: 2.4 > > Attachments: LANG-331-test.patch, LANG-331.patch > > > I have a ValuedEnum abstract subclass that I further subclass to attach useful implementation behaviors. The base class overrides getEnumClass(). The fix for LANG-259 broke compareTo() since it compares getClass(), not getEnumClass(). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.