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

Dan Jemiolo closed MUSE-210.
----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.3.0)
                   2.2.0

Was able to fix this in 2.2 after all - it was very similar to MUSE-211. I 
tested it by creating four properties - one String, one String[], one int, one 
int[], giving them appropriate values, and then invoking WSRP 
GetResourcePropertyDocument on the resource. In the latter two cases, the 
primitives were correctly transformed into Integer objects by Java's Array API 
and then the Muse Serializer API transformed them to XML. All array casts have 
been removed.


> AbstractWsResourceCapabilty.getPropertyElements() should use Java's Array API 
> to create array objects
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MUSE-210
>                 URL: https://issues.apache.org/jira/browse/MUSE-210
>             Project: Muse
>          Issue Type: Bug
>          Components: WSRF Core WsResource and WsResourceCapability API, WSRF 
> WSRP ResourcePropertyCollection and Capabilities
>    Affects Versions: 2.2.0
>            Reporter: Dan Jemiolo
>         Assigned To: Dan Jemiolo
>             Fix For: 2.2.0
>
>
> There's a bug in AbstractWsResourceCapability.getPropertyElements():
> if (value.getClass().isArray())
> {
>     values = (Object[])value;
>     type = ReflectUtils.getClassFromArrayClass(value.getClass());
> }
> if value is, say, an int[], not an Integer[], a ClassCastException is thrown. 
> the code should be fixed so that instead of the current shortcut (casting the 
> value to an array), we use the java.lang.reflect.Array API to make the array 
> object and copy the references. 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to