You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Dain Sundstrom (JIRA)" <ji...@apache.org> on 2006/07/15 01:41:13 UTC

[jira] Created: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

[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


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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by "james strachan (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/XBEAN-26?page=comments#action_12424796 ] 
            
james strachan commented on XBEAN-26:
-------------------------------------

+1

> [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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by "Jeff Genender (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/XBEAN-26?page=comments#action_12424879 ] 
            
Jeff Genender commented on XBEAN-26:
------------------------------------

+1...but this looks more like a bug fix..IMHO, this does not require RTC...I would commit and close.

> [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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by Matt Hogstrom <ma...@hogstrom.org>.
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.
> 

[jira] Commented: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by "Alan Cabrera (JIRA)" <ji...@apache.org>.
    [ 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by "Dain Sundstrom (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/XBEAN-26?page=all ]

Dain Sundstrom updated XBEAN-26:
--------------------------------

    Attachment: named-constructor-arg-fixes.patch

> [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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/XBEAN-26?page=comments#action_12423121 ] 
            
Guillaume Nodet commented on XBEAN-26:
--------------------------------------

+1 (if it needs RTC)

> [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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (XBEAN-26) [RTC] Nested properties not evaluated for named constructor args

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/XBEAN-26?page=all ]

Guillaume Nodet closed XBEAN-26.
--------------------------------

    Resolution: Fixed

Author: gnodet
Date: Tue Aug  1 08:33:08 2006
New Revision: 427614

URL: http://svn.apache.org/viewvc?rev=427614&view=rev
Log:
XBEAN-26: Nested properties not evaluated for named constructor args

Added:
   geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/ParameterMapping.java
Modified:
   geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/QdoxMappingLoader.java
   geronimo/xbean/trunk/xbean-spring-common/src/main/java/org/apache/xbean/spring/generator/XmlMetadataGenerator.java
   geronimo/xbean/trunk/xbean-spring-v1/src/main/java/org/apache/xbean/spring/context/v1/XBeanXmlBeanDefinitionParser.java
   geronimo/xbean/trunk/xbean-spring-v1/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
   geronimo/xbean/trunk/xbean-spring-v1/src/test/java/org/apache/xbean/spring/example/SoupService.java
   geronimo/xbean/trunk/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
   geronimo/xbean/trunk/xbean-spring-v1/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml
   geronimo/xbean/trunk/xbean-spring-v2/src/main/java/org/apache/xbean/spring/context/v2/XBeanNamespaceHandler.java
   geronimo/xbean/trunk/xbean-spring-v2/src/test/java/org/apache/xbean/spring/context/SoupUsingSpringTest.java
   geronimo/xbean/trunk/xbean-spring-v2/src/test/java/org/apache/xbean/spring/example/SoupService.java
   geronimo/xbean/trunk/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-normal.xml
   geronimo/xbean/trunk/xbean-spring-v2/src/test/resources/org/apache/xbean/spring/context/soup-xbean.xml


> [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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira