cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hector Kikuchi Martins (JIRA)" <>
Subject [jira] [Commented] (CXF-7213) FIQL Parser: Crashes when parsing a collection (java.util.Set) inside an object
Date Wed, 18 Jan 2017 18:09:26 GMT


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

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:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.5, 3.1.9
>            Reporter: Hector Kikuchi Martins
>         Attachments:
> The problem occur when an java.util.Set inside an object (not another collection) is
> 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

View raw message