Loading...

hivemind-dev@jakarta.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

[jira] Updated: (HIVEMIND-209) HiveMind can't inject a numeric value in an Integer property of a bean. Jochen Zimmermann (JIRA) Mon Jul 07 01:34:18 2008

     [ 
https://issues.apache.org/jira/browse/HIVEMIND-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jochen Zimmermann updated HIVEMIND-209:
---------------------------------------

    Attachment: hivemind-209.patch

First created a test case in TestSmartTranslator.java
Funny enough the test with "Double.class" does work, the new test with 
"Integer.class" does not.

In SmartTranslator.java I found a comment in the code that it is copied from 
PropertyAdaptor.java. So checked the code there and found that it was not 
exactly the same.
After completing the code in SmartTranslator.java the tests all passed.

Now it works, but the code is doubled. 


> HiveMind can't inject a numeric value in an Integer property of a bean.
> -----------------------------------------------------------------------
>
>                 Key: HIVEMIND-209
>                 URL: https://issues.apache.org/jira/browse/HIVEMIND-209
>             Project: HiveMind
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: 1.1.1
>            Reporter: St├ęphane Decleire
>            Priority: Minor
>         Attachments: hivemind-209.patch
>
>
> The declaration bellow throw the exception "No property editor for 
> java.lang.Integer"
> <service-point id="Alert" interface="IAlert">
>     <invoke-factory>
>         <construct class="impl.Alert">
>               <set property="radius" value="10"/>
>         </construct>
>     </invoke-factory>
> </service-point>
> James had a look at this and told me it happens "because it uses the 
> java.beans.PropertyEditorManager
> class to find an editor for that type (and it's not registered by default)".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.