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

Incorrect evaluation of system property for expression substitution

XMLWordPrintable

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

      Finally I think that I've got a way how to resolve expressions on VM where container resides.

      My test case:
      https://github.com/ochaloup/jboss-as/blob/expression-substitution-run-in-server/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/management/api/expression/ExpressionSubstitutionInContainerTestCase.java

      From this I've found issues for system property evaluation. I mean the case when System.getProperty(someName) is called.

      The application should get the evaluated value from expression but instead of it it gets the default value from expression.

      The problematic test cases are
      testSystemPropertyEvaluation - there is defined system property by calling System.setProperty and it's expected that the expression which uses this defined property will evaluate itself to the value of the System.setProperty. For the way of :resolve-expression it works fine but for getting value with System.getProperty the old default value is returned.
      setInnerExpression - it defines two levels of evaluation of expression and it seems that then the System.getProperty on the second level of evaluation does not get the evaluated/substituted value

      I hope that the test code will be more comprehensible than my explanation.

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

                Created:
                Updated:
                Resolved: