1. XalanJ2
  2. XALANJ-2475

XObject call to str then num fails / different results on multiple calls


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Component/s: XPath-API
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • Labels:
    • Environment:
      Any platform


      An XObject as obtained via XPath.execute returns different results for each call to str, num, nodeset, or bool. This quite similar to XALANJ-1335 but I wish to emphasize calling a different function, and that the result is different.

      In this case the result cannot be cached and used later as we wish to use a different result.

      For example:

      System.out.println( object.str() );
      int number = object.num() + 5;

      The second line does not work so long as the first line exists. You cannot extract multiple types from the result.

      There is nothing to suggest that these functions should have side-effects, nor is it understood why they would.

      This type of behaviour is vital in our TestPlan web testing suite which uses dynamic typing. We have no workaround.


        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12570992 ] jira [ 12594844 ]
        Mark Thomas made changes -
        Field Original Value New Value
        Workflow jira [ 12449742 ] Default workflow, editable Closed status [ 12570992 ]
        edA-qa mort-ora-y created issue -


          • Assignee:
            edA-qa mort-ora-y
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: