struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasper Rosenberg (JIRA)" <>
Subject [jira] [Created] (WW-4479) Ognl can't access static field on enum
Date Thu, 19 Mar 2015 12:30:38 GMT
Jasper Rosenberg created WW-4479:

             Summary: Ognl can't access static field on enum
                 Key: WW-4479
             Project: Struts 2
          Issue Type: Bug
          Components: Expression Language
    Affects Versions: 2.3.20
            Reporter: Jasper Rosenberg

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.


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

View raw message