cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vjacheslav Borisov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-6322) AbstractSearchConditionParser not working with UUID fields
Date Mon, 30 Mar 2015 12:58:54 GMT

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

Vjacheslav Borisov updated CXF-6322:
------------------------------------
    Description: 
Using of FIQL expression like bean.uuid=91d6350e-4bf5-42e8-9828-33767c6cb384
Where uuid is of type java.util.UUID

leads to  java.lang.InstantiationException: java.util.UUID
at line 194: nextObject = returnType.newInstance();

Becouse  java.util.UUID does not have no-arg constructor.
Istead of this InjectionUtils.isPrimitive should return true for java.util.UUID, then execution
path should go to if (lastTry) { branch
and convertStringToPrimitive is working correctly with java.util.UUID

Quick fix is to change  line 168  - add  " ||returnType.equals(java.util.UUID.class): "
                boolean isPrimitive = !returnCollection
                    && InjectionUtils.isPrimitive(returnType) || returnType.isEnum()
||returnType.equals(java.util.UUID.class);



  was:
Using of FIQL expression like bean.uuid=91d6350e-4bf5-42e8-9828-33767c6cb384
Where uuid is of type java.util.UUID

leads to  java.lang.InstantiationException: java.util.UUID
at line 194: nextObject = returnType.newInstance();

Becouse  java.util.UUID does not have no-arg constructor.
Istead of this InjectionUtils.isPrimitive should return true for java.util.UUID, then execution
path should go to if (lastTry) { branch
and convertStringToPrimitive is working correctly with java.util.UUID

Quick fix is to change  line 168  - add  " ||returnType.equals(java.util.UUID.class): "
                boolean isPrimitive = !returnCollection
                    && InjectionUtils.isPrimitive(returnType) || returnType.isEnum()
;




> AbstractSearchConditionParser not working with UUID fields
> ----------------------------------------------------------
>
>                 Key: CXF-6322
>                 URL: https://issues.apache.org/jira/browse/CXF-6322
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.0.4
>            Reporter: Vjacheslav Borisov
>            Priority: Minor
>
> Using of FIQL expression like bean.uuid=91d6350e-4bf5-42e8-9828-33767c6cb384
> Where uuid is of type java.util.UUID
> leads to  java.lang.InstantiationException: java.util.UUID
> at line 194: nextObject = returnType.newInstance();
> Becouse  java.util.UUID does not have no-arg constructor.
> Istead of this InjectionUtils.isPrimitive should return true for java.util.UUID, then
execution path should go to if (lastTry) { branch
> and convertStringToPrimitive is working correctly with java.util.UUID
> Quick fix is to change  line 168  - add  " ||returnType.equals(java.util.UUID.class):
"
>                 boolean isPrimitive = !returnCollection
>                     && InjectionUtils.isPrimitive(returnType) || returnType.isEnum()
||returnType.equals(java.util.UUID.class);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message