[ 
https://issues.apache.org/jira/browse/DRILL-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Nadeau updated DRILL-3656:
----------------------------------
    Assignee: Daniel Barclay (Drill)

> Accountor catch intended for ConfigException hides NullPointerException (?)
> ---------------------------------------------------------------------------
>
>                 Key: DRILL-3656
>                 URL: https://issues.apache.org/jira/browse/DRILL-3656
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Daniel Barclay (Drill)
>            Assignee: Daniel Barclay (Drill)
>
> In org.apache.drill.exec.memory.Accountor's constructor, there is a 
> "catch(Exception e) ..." clause that used to catch ConfigExceptions (when a 
> requested configuration item wasn't known to the passed-in DrillConfig 
> object, which occurred at least in some unit tests).
> However, now that catch clause is also catching NullPointerExceptions because 
> (sometimes) the DrillConfig parameter is null (in some unit tests).
> It seems that:
> - that catch clause should specifically catch only ConfigException (so that 
> it doesn't accidentlaly hide any unexpected exceptions), and
> - if the DrillConfig parameter is allowed to be null, the code should be 
> handling that case explicitly with a test for null, not via a catch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to