Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-56

the NOT of complex expression fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.7
    • 2.7
    • ExpressionCompiler
    • None

    Description

      The test case

      { "!(true && true)", Boolean.FALSE}

      ,

      for org.ognl.test.ArithmeticAndLogicalOperatorsTest fails. This is because of the expression !(condition1() && condition2()) is compiled to form

      !ognl.OgnlOps.booleanValue((($SomeClass_490)$2).condition1()) ? ($w) ((($SomeClass_490)$2).condition2()) : ($w) ((($SomeClass_490)$2).condition2());"

      where the negation is applied to ognl.OgnlOps.booleanValue(..) but not to the full expression result.

      this bug has workaround to use !true || !true instead, but it require the revision of a lot code amount.

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            lucker Alexander Gavrilov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: