[
https://issues.apache.org/jira/browse/CXF-7213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828489#comment-15828489
]
Hector Kikuchi Martins commented on CXF-7213:
---------------------------------------------
After some debbuging I found out that maybe several parsers may have the same
issue, since the "crash" occurs on the class: AbstractSearchConditionParser on
rt-rs-extensions-search project.
The follow attribution on line 214:
Object valueObjectValue = lastTry || !returnCollection
? nextObject : getCollectionSingleton(valueType,
nextObject);
The parameter valueType is not an Collection an thus, the
getCollectionSingleton method will always return Collections.singletonList()
which is an List, crashing the reflection invoke to an setter to a
java.util.Set.
I cloned the repository and switched the parameter valueType to returnType and
fixed my issue, but since I don't have enough knowledge on the whole project, I
didn't know if it can cause any other collateral bug.
> FIQL Parser: Crashes when parsing a collection (java.util.Set) inside an
> object
> -------------------------------------------------------------------------------
>
> Key: CXF-7213
> URL: https://issues.apache.org/jira/browse/CXF-7213
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.1.5, 3.1.9
> Reporter: Hector Kikuchi Martins
> Attachments: CxfTest.java
>
>
> The problem occur when an java.util.Set inside an object (not another
> collection) is parsed.
> Ex: "furniture.spec.features.description==description".
> Furniture is a Set on an Room class.
> Spec is an single Object on Furniture class.
> Features is a Set on Spec class.
> Description is a String on Feature class.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)