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:32:34 UTC

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

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.


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

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart reassigned JCR-1286:
---------------------------------------

    Assignee: Christophe Lombart

> 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
>            Assignee: Christophe Lombart
>
> 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.


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

Posted by "Paul Mietz Egli (JIRA)" <ji...@apache.org>.
     [ 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.


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

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart resolved JCR-1286.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

>From now, the Filter is using the converter if it is specified in the mapping definition. 
Let me know if something is wrong

Thanks

> 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
>            Assignee: Christophe Lombart
>             Fix For: 1.5
>
>
> 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.