You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Michael Sokalski (JIRA)" <ji...@apache.org> on 2012/10/03 18:32:07 UTC

[jira] [Created] (CAMEL-5682) possible NullPointerException in org.apache.camel.util.ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext)

Michael Sokalski created CAMEL-5682:
---------------------------------------

             Summary: possible NullPointerException in org.apache.camel.util.ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext)
                 Key: CAMEL-5682
                 URL: https://issues.apache.org/jira/browse/CAMEL-5682
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.10.0
         Environment: Linux, Spring 3.1.1, Karaf 2.2.4
            Reporter: Michael Sokalski
            Priority: Minor


If the camel context's properties contain an entry set with a null key, and ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext) is called, a NullPointerException will be thrown at line 659.

--
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-5682) possible NullPointerException in org.apache.camel.util.ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext)

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

Claus Ibsen resolved CAMEL-5682.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.10.2
                   2.11.0
                   2.9.4
         Assignee: Claus Ibsen

Thanks for reporting.

Unlikely to happen as an end user would not store a property with a null key. That does not make sense.

But added a null check in the source code.
                
> possible NullPointerException in org.apache.camel.util.ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext)
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5682
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5682
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: Linux, Spring 3.1.1, Karaf 2.2.4
>            Reporter: Michael Sokalski
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.4, 2.11.0, 2.10.2
>
>
> If the camel context's properties contain an entry set with a null key, and ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext) is called, a NullPointerException will be thrown at line 659.

--
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] [Commented] (CAMEL-5682) possible NullPointerException in org.apache.camel.util.ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext)

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

Michael Sokalski commented on CAMEL-5682:
-----------------------------------------

Definitely unlikely to happen.  I only found the error because I messed up a property in my context's xml-based setup that led to the code adding a property with a null key.  It might be a good idea to prohibit properties with null keys from being added to the context.
                
> possible NullPointerException in org.apache.camel.util.ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext)
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5682
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5682
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.10.0
>         Environment: Linux, Spring 3.1.1, Karaf 2.2.4
>            Reporter: Michael Sokalski
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.9.4, 2.11.0, 2.10.2
>
>
> If the camel context's properties contain an entry set with a null key, and ObjectHelper.getCamelPropertiesWithPrefix(prefix, camelContext) is called, a NullPointerException will be thrown at line 659.

--
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