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.

Reply via email to