You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Brock Noland (JIRA)" <ji...@apache.org> on 2012/04/28 18:48:48 UTC

[jira] [Created] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

Brock Noland created FLUME-1160:
-----------------------------------

             Summary: ComponentConfigurationFactory catches NullPointerException
                 Key: FLUME-1160
                 URL: https://issues.apache.org/jira/browse/FLUME-1160
             Project: Flume
          Issue Type: Improvement
          Components: Configuration
    Affects Versions: v1.2.0
            Reporter: Brock Noland


Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264400#comment-13264400 ] 

jiraposter@reviews.apache.org commented on FLUME-1160:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4927/
-----------------------------------------------------------

Review request for Flume and Brock Noland.


Summary
-------

Actually nothing in that try block would throw an NPE, so removing it. 


This addresses bug FLUME-1160.
    https://issues.apache.org/jira/browse/FLUME-1160


Diffs
-----

  flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java c495cde 

Diff: https://reviews.apache.org/r/4927/diff


Testing
-------


Thanks,

Hari


                
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264435#comment-13264435 ] 

jiraposter@reviews.apache.org commented on FLUME-1160:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4927/#review7366
-----------------------------------------------------------

Ship it!


lgtm, attache the patch to the jira if not already there

- Brock


On 2012-04-28 21:36:08, Hari Shreedharan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4927/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-28 21:36:08)
bq.  
bq.  
bq.  Review request for Flume and Brock Noland.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Actually nothing in that try block would throw an NPE, so removing it. To clarify: 
bq.  * a check for type being null is done before entering this code. 
bq.  * valueOf throws an IllegalArgumentException if the type cannot be found(which is caught and rethrown)
bq.  * All of the getConfiguration functions *will* return a configuration object(or throw) and not return null.
bq.  
bq.  
bq.  This addresses bug FLUME-1160.
bq.      https://issues.apache.org/jira/browse/FLUME-1160
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java c495cde 
bq.  
bq.  Diff: https://reviews.apache.org/r/4927/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Hari
bq.  
bq.


                
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264440#comment-13264440 ] 

jiraposter@reviews.apache.org commented on FLUME-1160:
------------------------------------------------------



bq.  On 2012-04-28 23:27:37, Brock Noland wrote:
bq.  > lgtm, attache the patch to the jira if not already there

Thanks Brock! Already attached. 


- Hari


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4927/#review7366
-----------------------------------------------------------


On 2012-04-28 21:36:08, Hari Shreedharan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4927/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-28 21:36:08)
bq.  
bq.  
bq.  Review request for Flume and Brock Noland.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Actually nothing in that try block would throw an NPE, so removing it. To clarify: 
bq.  * a check for type being null is done before entering this code. 
bq.  * valueOf throws an IllegalArgumentException if the type cannot be found(which is caught and rethrown)
bq.  * All of the getConfiguration functions *will* return a configuration object(or throw) and not return null.
bq.  
bq.  
bq.  This addresses bug FLUME-1160.
bq.      https://issues.apache.org/jira/browse/FLUME-1160
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java c495cde 
bq.  
bq.  Diff: https://reviews.apache.org/r/4927/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Hari
bq.  
bq.


                
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

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

Hari Shreedharan updated FLUME-1160:
------------------------------------

    Status: Patch Available  (was: Open)
    
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

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

Hari Shreedharan reassigned FLUME-1160:
---------------------------------------

    Assignee: Hari Shreedharan
    
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264569#comment-13264569 ] 

Hudson commented on FLUME-1160:
-------------------------------

Integrated in flume-trunk #189 (See [https://builds.apache.org/job/flume-trunk/189/])
    FLUME-1160: ComponentConfigurationFactory catches NullPointerException

(Hari Shreedharan via Brock Noland) (Revision 1331916)

     Result = SUCCESS
brock : http://svn.apache.org/viewvc/?view=rev&rev=1331916
Files : 
* /incubator/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java

                
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>             Fix For: v1.2.0
>
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

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

Hari Shreedharan updated FLUME-1160:
------------------------------------

    Attachment: FLUME-1160.patch
    
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

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

Brock Noland updated FLUME-1160:
--------------------------------

       Resolution: Fixed
    Fix Version/s: v1.2.0
           Status: Resolved  (was: Patch Available)

Committed in 1331916.

Thank you for your patch Hari!!
                
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>             Fix For: v1.2.0
>
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

--
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] (FLUME-1160) ComponentConfigurationFactory catches NullPointerException

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264407#comment-13264407 ] 

jiraposter@reviews.apache.org commented on FLUME-1160:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4927/
-----------------------------------------------------------

(Updated 2012-04-28 21:36:08.179731)


Review request for Flume and Brock Noland.


Changes
-------

Update description.


Summary (updated)
-------

Actually nothing in that try block would throw an NPE, so removing it. To clarify: 
* a check for type being null is done before entering this code. 
* valueOf throws an IllegalArgumentException if the type cannot be found(which is caught and rethrown)
* All of the getConfiguration functions *will* return a configuration object(or throw) and not return null.


This addresses bug FLUME-1160.
    https://issues.apache.org/jira/browse/FLUME-1160


Diffs
-----

  flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfigurationFactory.java c495cde 

Diff: https://reviews.apache.org/r/4927/diff


Testing
-------


Thanks,

Hari


                
> ComponentConfigurationFactory catches NullPointerException
> ----------------------------------------------------------
>
>                 Key: FLUME-1160
>                 URL: https://issues.apache.org/jira/browse/FLUME-1160
>             Project: Flume
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Hari Shreedharan
>         Attachments: FLUME-1160.patch
>
>
> Catching NPE and then returning null is super hard to debug when there is an actual bug.  We should put the appropriate null checks in place so we don't have to catch NPE.

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