jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Mietz Egli (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1286) FilterImpl.getStringValue() does not use custom converter class specified in @Field annotation
Date Thu, 03 Jan 2008 00:32:34 GMT
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
            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.


Mime
View raw message