Custom JAX-RS ParamConverter doesn't work for collection and array types #6761
Labels
in:JAX-RS
release bug
This bug is present in a released version of Open Liberty
release:19003
team:Wendigo West
I was trying to create a custom
javax.ws.rs.ext.ParamConverter<List<String>>
. The idea is to convert query parameters such as "ids=i1,i2,i3" into a list of strings i1, i2, i3 in the resource class. The convert is instantiated correctly and used but the call actually fails withI did a bit of debugging and it seems there is some special treatment for collections and arrays in
org.apache.cxf.jaxrs.utils.InjectionUtils
which partially ignores the customParamConverter
. It's called but the returned value as assume to be the type inside the collection.Attached is a small example project to reproduce the issue:
mvn package
java -jar com.knime.enterprise.cloud.service.repository.app/target/cloud.service.repository.app-0.0.2-SNAPSHOT.jar
curl http://localhost:9080/repository/foo?ids=1,2,3
The relevant code is in com.knime.enterprise.cloud.service.repository.impl/src/main/java/com/knime/enterprise/cloud/service/repository/impl/v4
This occurs in Open Liberty 18.0.0.3.
jar-zip.zip
The text was updated successfully, but these errors were encountered: