Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.7
    • Component/s: ExpressionCompiler
    • Labels:
      None
    • Environment:
      Tapestry 4.1.2-SNAPSHOT (latest)

      OGNL 2.7-SNAPSHOT

      Description

      The following throws a NPE in OGNL 2.7 but not in previous versions:

      test.html:

      <span jwcid="@Insert" value="ognl:(text1 == null) ? 'Empty' : text1.length()"/><br/>

      <span jwcid="@Insert" value="ognl:(text2 == null) ? 'Empty' : text2.length()"/> <------- text2 is null

      test.page:

      <page-specification>

      <property name="text1" initial-value="'text1'"/>

      <property name="text2"/> <------- text2 is null

      </page-specification>

      exception:

      java.lang.NullPointerException: target is null for method length

      at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:963)

      at ognl.ASTMethod.getValueBody(ASTMethod.java:90)

      etc.

      Another thing I noticed is that:

      <span jwcid="@Insert" value="ognl:(text1 == null) ? '1' : text1.length()"/><br/>

      works for the previous OGNL, but not for 2.7

      Best Regards,

      Manri Offermann

        Activity

        Hide
        Jesse Kuhnert added a comment -

        Should be fixed in release today.

        Show
        Jesse Kuhnert added a comment - Should be fixed in release today.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Manri Offermann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development