Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-26

[RTC] Nested properties not evaluated for named constructor args

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6
    • spring
    • None

    Description

      Nested property elements are not evaluated when they are constructor arguments. For example the following three declarations should be equivalent:

        <s:soup id="soupService" type="French Onion"/>
      
        <s:soup id="nestedBean">
          <s:type>
            <bean class="java.lang.String">
              <constructor-arg index="0" value="French Onion"/>
            </bean>
          </s:type>
        </s:soup>
      
        <s:soup id="nestedValue">
          <s:type>
            <value>French Onion</value>
          </s:type>
        </s:soup>
      

      The patch attempts to find a setter for the property and if not located assumes it is type Object instead of just aborting the evaluation. This means that constructor args without a matching getter or setter can't support our custom map element code because we don't knot the type of the constructor argument at this point in the code. Fixing that will take a much bigger restructure of the code.

      There are test cases included with the patch. Note there is one new file included with the patch that must be svn added.

      Attachments

        1. named-constructor-arg-fixes.patch
          20 kB
          Dain Sundstrom

        Activity

          People

            dain Dain Sundstrom
            dain Dain Sundstrom
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: