You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Fabrice Daugan (Created) (JIRA)" <ji...@apache.org> on 2012/02/28 18:51:46 UTC

[jira] [Created] (CAMEL-5051) NullPointerException when assigning a simple Object as final bean

NullPointerException when assigning a simple Object as final bean
-----------------------------------------------------------------

                 Key: CAMEL-5051
                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.9.0
         Environment: JSE6, Windows7
            Reporter: Fabrice Daugan
            Priority: Trivial


Considering this route :

from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());

I get a NPE. I know, this is a very rare case that noone will reach again...
Anyway the fix is very simple, and is attached with it's test case.


--
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-5051) NullPointerException when assigning a simple Object as final bean

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

Fabrice Daugan updated CAMEL-5051:
----------------------------------

    Attachment: CAMEL-5051.patch
    
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Priority: Trivial
>         Attachments: CAMEL-5051.patch, MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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-5051) NullPointerException when assigning a simple Object as final bean

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

Babak Vahdat reassigned CAMEL-5051:
-----------------------------------

    Assignee: Babak Vahdat
    
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Assignee: Babak Vahdat
>            Priority: Trivial
>         Attachments: CAMEL-5051.patch, MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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] [Resolved] (CAMEL-5051) NullPointerException when assigning a simple Object as final bean

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

Babak Vahdat resolved CAMEL-5051.
---------------------------------

    Resolution: Fixed
    
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Assignee: Babak Vahdat
>            Priority: Trivial
>             Fix For: 2.8.5, 2.9.1, 2.10.0
>
>         Attachments: CAMEL-5051.patch, MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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-5051) NullPointerException when assigning a simple Object as final bean

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

Fabrice Daugan updated CAMEL-5051:
----------------------------------

    Attachment: MyRouteBuilder.java
    
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Priority: Trivial
>         Attachments: MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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-5051) NullPointerException when assigning a simple Object as final bean

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

Babak Vahdat commented on CAMEL-5051:
-------------------------------------

Thanks for reporting, I did however change the patch your provided a bit as the intention is *not* to skip the java.lang.Object.toString() methid. See the static block initializing EXCLUDED_METHODS.

Also added a tiny unit-test to verify the behaviour. 
                
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Assignee: Babak Vahdat
>            Priority: Trivial
>             Fix For: 2.8.5, 2.9.1, 2.10.0
>
>         Attachments: CAMEL-5051.patch, MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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-5051) NullPointerException when assigning a simple Object as final bean

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

Fabrice Daugan updated CAMEL-5051:
----------------------------------

    Attachment: stacktrace.txt

Relevant trace : 
{noformat} 
Caused by: java.lang.NullPointerException
	at org.apache.camel.component.bean.BeanInfo.collectParameterAnnotations(BeanInfo.java:386)
	at org.apache.camel.component.bean.BeanInfo.collectParameterAnnotations(BeanInfo.java:397)
	at org.apache.camel.component.bean.BeanInfo.collectParameterAnnotations(BeanInfo.java:380)
	at org.apache.camel.component.bean.BeanInfo.createMethodInfo(BeanInfo.java:323)
{noformat} 
                
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Priority: Trivial
>         Attachments: stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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-5051) NullPointerException when assigning a simple Object as final bean

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

Babak Vahdat updated CAMEL-5051:
--------------------------------

    Fix Version/s: 2.10.0
                   2.9.1
                   2.8.5
    
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Assignee: Babak Vahdat
>            Priority: Trivial
>             Fix For: 2.8.5, 2.9.1, 2.10.0
>
>         Attachments: CAMEL-5051.patch, MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

--
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] [Issue Comment Edited] (CAMEL-5051) NullPointerException when assigning a simple Object as final bean

Posted by "Babak Vahdat (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218754#comment-13218754 ] 

Babak Vahdat edited comment on CAMEL-5051 at 2/29/12 12:29 AM:
---------------------------------------------------------------

Thanks for reporting, I did however change the patch your provided a bit as the intention is *not* to skip the java.lang.Object.toString() method. See the static block initializing the EXCLUDED_METHODS field.

Also added a tiny unit-test to verify the behaviour. 
                
      was (Author: bvahdat):
    Thanks for reporting, I did however change the patch your provided a bit as the intention is *not* to skip the java.lang.Object.toString() methid. See the static block initializing EXCLUDED_METHODS.

Also added a tiny unit-test to verify the behaviour. 
                  
> NullPointerException when assigning a simple Object as final bean
> -----------------------------------------------------------------
>
>                 Key: CAMEL-5051
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5051
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.9.0
>         Environment: JSE6, Windows7
>            Reporter: Fabrice Daugan
>            Assignee: Babak Vahdat
>            Priority: Trivial
>             Fix For: 2.8.5, 2.9.1, 2.10.0
>
>         Attachments: CAMEL-5051.patch, MyRouteBuilder.java, stacktrace.txt
>
>
> Considering this route :
> from("direct://myendpoint").routeId("myendpoint.route").bean(new Object());
> I get a NPE. I know, this is a very rare case that noone will reach again...
> Anyway the fix is very simple, and is attached with it's test case.

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