Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-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 68EF218723 for ; Thu, 10 Dec 2015 14:58:16 +0000 (UTC) Received: (qmail 80847 invoked by uid 500); 10 Dec 2015 14:58:11 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 80797 invoked by uid 500); 10 Dec 2015 14:58:11 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 80780 invoked by uid 99); 10 Dec 2015 14:58:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Dec 2015 14:58:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 04B0A2C14F9 for ; Thu, 10 Dec 2015 14:58:11 +0000 (UTC) Date: Thu, 10 Dec 2015 14:58:11 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (WW-4479) Ognl can't access static field on enum 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/WW-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15051070#comment-15051070 ] Lukasz Lenart commented on WW-4479: ----------------------------------- This is fixed in OGNL 3.1.2 > Ognl can't access static field on enum > -------------------------------------- > > Key: WW-4479 > URL: https://issues.apache.org/jira/browse/WW-4479 > Project: Struts 2 > Issue Type: Bug > Components: Expression Language > Affects Versions: 2.3.20 > Reporter: Jasper Rosenberg > Assignee: Aleksandr Mashchenko > Labels: ognl > Fix For: 2.5 > > > You can use an ognl expression to access a static field or an enum field, but you can't access a static field on an enum. > @com.myco.MyEnum@MY_STATIC_FIELD > blows up with: > Caused by: java.lang.IllegalArgumentException: No enum constant com.myco.MyEnum.MY_STATIC_FIELD > OgnlRuntime.getStaticField() needs to check for both enum field name and static field name for enums. > This is particularly annoying now with ognl static method invocation deprecated. -- This message was sent by Atlassian JIRA (v6.3.4#6332)