You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Brent Daniel (JIRA)" <de...@tuscany.apache.org> on 2010/08/19 09:42:16 UTC

[jira] Commented: (TUSCANY-3645) otest JCA9013 fails to fail for invalid property type

    [ https://issues.apache.org/jira/browse/TUSCANY-3645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900204#action_12900204 ] 

Brent Daniel commented on TUSCANY-3645:
---------------------------------------

I checked in some changes for this in rev 987051. Unfortunately, I think we need to do specific validation of the types outside of the databinding code that transforms the property from XML to java. Perhaps there is a better solution here where the JAXB databinding could better determine when the conversion is invalid, but at the moment it will attempt to convert anything that appears in the XML to the requested java type. 

> otest JCA9013 fails to fail for invalid property type
> -----------------------------------------------------
>
>                 Key: TUSCANY-3645
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3645
>             Project: Tuscany
>          Issue Type: Bug
>          Components: OASIS Compliance - TUSCANY
>    Affects Versions: Java-SCA-2.0-M5
>            Reporter: Kelvin Goodson
>             Fix For: Java-SCA-2.0-Beta1
>
>
> Test assertion JCA-TA-9033 requires the line of code  ...
>   componentContext.getProperty(HashSet.class, "floatProperty");
> ... to fail with an IllegalArgumentException.  The property value set is expressed as a DOM with type xsd:float. The line of code does not throw an exception, but returns  an empty HashSet.  I discussed this with Mike Edwards who reconsidered whether HashSet was the best complex type to provoke the failure, since it may be considered correct in the case of such collection types that are inherently generic to create a collection of HashSet<propertyType> containing the property value. (Note that the code does not do this, but only returns and empty HashSet, so we have a problem anyway)   I tried the modified test with Date.class, but the modified line of code persisted in failing to throw an exception. 

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