commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrice DUROUX (Jira)" <>
Subject [jira] [Created] (OGNL-259) trouble with Enum subclassing
Date Fri, 25 Oct 2019 19:09:00 GMT
Patrice DUROUX created OGNL-259:

             Summary: trouble with Enum subclassing
                 Key: OGNL-259
             Project: Commons OGNL
          Issue Type: Bug
            Reporter: Patrice DUROUX


I found the following problem using Struts (2.5.20) based on OGNL (3.1.21) and same result
forcing OGNL (3.1.25, as 3.2.x series seem to be not compatible with this version of Struts).

The situation can be summarize  with the following 2 enums:
enum Normal { A, B; }
enum Strange {A {}, B{}; } // mainly for implementing abstract method(s)
and the following expressions are:
@Normal@A==@Normal@A // true
@Normal@A!=@Normal@A // false
@Normal@A==@Normal@B // false
@Normal@A!=@Normal@B // true{noformat}
whereas the following expressions are:
@Strange@A==@Strange@A // true
@Strange@A!=@Strange@A // false
@Strange@A==@Strange@B // false (with warn log)
@Strange@A!=@Strange@B // false (with warn log){noformat}
and the origin of the wrong test value was discover activating WARN log level in Struts (using



This message was sent by Atlassian Jira

View raw message