You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Paul Mietz Egli (JIRA)" <ji...@apache.org> on 2008/01/03 01:36:34 UTC

[jira] Updated: (JCR-1286) FilterImpl.getStringValue() does not use custom converter class specified in @Field annotation

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

Paul Mietz Egli updated JCR-1286:
---------------------------------

    Environment: 
jackrabbit-ocm-1.4-20071210.145858-1
java version "1.5.0_13"



> FilterImpl.getStringValue() does not use custom converter class specified in @Field annotation
> ----------------------------------------------------------------------------------------------
>
>                 Key: JCR-1286
>                 URL: https://issues.apache.org/jira/browse/JCR-1286
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-ocm
>    Affects Versions: 1.4
>         Environment: jackrabbit-ocm-1.4-20071210.145858-1
> java version "1.5.0_13"
>            Reporter: Paul Mietz Egli
>
> I have a POJO with the following field:
>     @Field(converter = LocaleConverter.class)
>     private Locale                locale;
> When I attempt to query for objects based on this field, I get a NullPointerException:
> java.lang.NullPointerException
>         at org.apache.jackrabbit.ocm.query.impl.FilterImpl.getStringValue(FilterImpl.java:281)
>         at org.apache.jackrabbit.ocm.query.impl.FilterImpl.addEqualTo(FilterImpl.java:129)
> FilterImpl should preferentially use the atomic type converter defined in the @Field annotation to convert the value, then fallback to the global converters.  Converting the Locale to a string for use in the query is a workaround, but the logic for string conversion should only reside in my LocaleConverter class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.