Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-6431

Incorrectly evaluated expression when property is defined after the expression in xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • EAP 6.1.0.Alpha (7.2.0.Final)
    • Domain Management
    • None

      There is problem in evaluation of expression in case that property for evaluation is defined after the expression.
      In case of using DMR the order of property and expression definition is not taken in consideration and substitution works fine.

      When you define system properties in xml like:

          <system-properties>
              <property name="qa.test.property" value="${qa.test.exp:defaultValue}"/>
              <property name="qa.test.exp" value="expression.value"/>
          </system-properties>
      

      you start the container and then you can check the expression evaluation in jboss-cli.sh with command:

      :resolve-expression(expression="${qa.test.property}")
      

      The expression will be evaluated as "defaultValue" what is not correct because the "qa.test.exp" is defined.
      When you switch definitions of properties (switch <property> tags) then the expression will be evaluated correctly (as "expression.value).

              bstansbe@redhat.com Brian Stansberry
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: