Its a bug...not RTC required.

Alan Cabrera (JIRA) wrote:
[ http://issues.apache.org/jira/browse/XBEAN-26?page=comments#action_12421457 ] Alan Cabrera commented on XBEAN-26:
-----------------------------------

If this is a real bug, then I'm not sure that if falls under RTC policy

[RTC] Nested properties not evaluated for named constructor args
----------------------------------------------------------------

                Key: XBEAN-26
                URL: http://issues.apache.org/jira/browse/XBEAN-26
            Project: XBean
         Issue Type: Bug
         Components: spring
           Reporter: Dain Sundstrom
        Assigned To: Dain Sundstrom
            Fix For: 2.6

        Attachments: named-constructor-arg-fixes.patch


Nested property elements are not evaluated when they are constructor arguments. 
 For example the following three declarations should be equivalent:
{code}
  <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>
{code}
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.

Reply via email to