[
https://issues.apache.org/jira/browse/CXF-6467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593549#comment-14593549
]
Pengling Qian commented on CXF-6467:
------------------------------------
class: org.apache.cxf.jaxrs.utils.InjectionUtils.java
method: fillInValuesFromBean()
line 1197:
{code}
if (value.getClass().isArray()) {
theValues = Arrays.asList(value); // <== bugfix: theValues =
Arrays.asList((Object[])value);
} else if (value instanceof Set)
{code}
> Jaxrs client handles array type property in a form object as a single element
> -----------------------------------------------------------------------------
>
> Key: CXF-6467
> URL: https://issues.apache.org/jira/browse/CXF-6467
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.6.16, 2.7.16, 3.1.1
> Reporter: Pengling Qian
> Labels: client, form
> Fix For: 3.1.2
>
>
> class MyForm {
> String name;
> Integer[] vals;
> }
> //----------------------------
> @PUT
> @Path("test")
> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
> void test(@FormParam("") MyForm frm);
> //----------------------------
> frm.name="blabla";
> frm.vals=new Integer[]{1,2};
> service.test(frm);
> //----------------------------
> expected POST entity body:
> name=blabla&vals=1&vals=2
> but actual entity body:
> name=blabla&vals=[Ljava.lang.Integer;@16554210
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)