You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Michal Svab (JIRA)" <ji...@apache.org> on 2012/07/11 01:01:36 UTC

[jira] [Created] (CAMEL-5436) Cache expects string in CacheKey header

Michal Svab created CAMEL-5436:
----------------------------------

             Summary: Cache expects string in CacheKey header
                 Key: CAMEL-5436
                 URL: https://issues.apache.org/jira/browse/CAMEL-5436
             Project: Camel
          Issue Type: Bug
          Components: camel-cache
    Affects Versions: 2.10.0
            Reporter: Michal Svab


Currently if you specify other value than String as the cache key header, we get ClassCastException. It would be great, if it would use the type converter to convert the key object into String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5436) Cache expects string in CacheKey header

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

Claus Ibsen updated CAMEL-5436:
-------------------------------

      Priority: Minor  (was: Major)
    Issue Type: Improvement  (was: Bug)

This is not a bug.

Why do you use non strings as keys, this is very unusual. Can you tell more about your use-case.
                
> Cache expects string in CacheKey header
> ---------------------------------------
>
>                 Key: CAMEL-5436
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5436
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.10.0
>            Reporter: Michal Svab
>            Priority: Minor
>         Attachments: 0001-Use-type-conversion-for-non-string-cache-key.patch
>
>
> Currently if you specify other value than String as the cache key header, we get ClassCastException. It would be great, if it would use the type converter to convert the key object into String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5436) Cache expects string in CacheKey header

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

Michal Svab updated CAMEL-5436:
-------------------------------

    Attachment: 0001-Use-type-conversion-for-non-string-cache-key.patch

Attached a patch.
                
> Cache expects string in CacheKey header
> ---------------------------------------
>
>                 Key: CAMEL-5436
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5436
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cache
>    Affects Versions: 2.10.0
>            Reporter: Michal Svab
>         Attachments: 0001-Use-type-conversion-for-non-string-cache-key.patch
>
>
> Currently if you specify other value than String as the cache key header, we get ClassCastException. It would be great, if it would use the type converter to convert the key object into String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5436) Cache expects string in CacheKey header

Posted by "Michal Svab (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412067#comment-13412067 ] 

Michal Svab commented on CAMEL-5436:
------------------------------------

I often store objects in the cache that have IDs as a cache key. The ID is usually Long or in case of natural keys it can be an object. Right now, in the route I have additional step that converts the id to string before setting the header, however with this improvement it would do this conversion automatically. It's more of a cosmetic change I suppose.
                
> Cache expects string in CacheKey header
> ---------------------------------------
>
>                 Key: CAMEL-5436
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5436
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.10.0
>            Reporter: Michal Svab
>            Priority: Minor
>         Attachments: 0001-Use-type-conversion-for-non-string-cache-key.patch
>
>
> Currently if you specify other value than String as the cache key header, we get ClassCastException. It would be great, if it would use the type converter to convert the key object into String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-5436) Cache expects string in CacheKey header

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

Claus Ibsen reassigned CAMEL-5436:
----------------------------------

    Assignee: Claus Ibsen
    
> Cache expects string in CacheKey header
> ---------------------------------------
>
>                 Key: CAMEL-5436
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5436
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.10.0
>            Reporter: Michal Svab
>            Assignee: Claus Ibsen
>            Priority: Minor
>         Attachments: 0001-Use-type-conversion-for-non-string-cache-key.patch
>
>
> Currently if you specify other value than String as the cache key header, we get ClassCastException. It would be great, if it would use the type converter to convert the key object into String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-5436) Cache expects string in CacheKey header

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

Claus Ibsen resolved CAMEL-5436.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.10.2
                   2.11.0

Thanks for the patch.
                
> Cache expects string in CacheKey header
> ---------------------------------------
>
>                 Key: CAMEL-5436
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5436
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-cache
>    Affects Versions: 2.10.0
>            Reporter: Michal Svab
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0, 2.10.2
>
>         Attachments: 0001-Use-type-conversion-for-non-string-cache-key.patch
>
>
> Currently if you specify other value than String as the cache key header, we get ClassCastException. It would be great, if it would use the type converter to convert the key object into String.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira