[ 
https://issues.apache.org/jira/browse/DIRKRB-354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14624206#comment-14624206
 ] 

Xu Yaning edited comment on DIRKRB-354 at 7/13/15 5:21 AM:
-----------------------------------------------------------

In this patch, I disable {{getBooleanOption(KOption option)}} to return 
{{null}} by passing a parameter {{defaultValue}} such that it becomes 
{{getBooleanOption(KOption option, Boolean defaultValue)}}, and modify the 
codes that invoke it. Pls help me review it, thank you~


was (Author: yaningxu):
In this patch, I disable {{getBooleanOption(KOption option)}} to return 
{{null}} by passing a parameter {{defaultValue}} such that it becomes 
{{getBooleanOption(KOption option, Boolean defaultValue)}}, and modify the 
codes where invoke it. Pls help me review it, thank you~

> Fix getBooleanOption return null problem
> ----------------------------------------
>
>                 Key: DIRKRB-354
>                 URL: https://issues.apache.org/jira/browse/DIRKRB-354
>             Project: Directory Kerberos
>          Issue Type: Bug
>            Reporter: Xu Yaning
>         Attachments: DIRKRB-354-v1.patch
>
>
> org.apache.kerby.KOptions.getBooleanOption(KOption) has Boolean return type 
> and returns explicit null; A method that returns either Boolean.TRUE, 
> Boolean.FALSE or null is an accident waiting to happen. This method can be 
> invoked as though it returned a value of type boolean, and the compiler will 
> insert automatic unboxing of the Boolean value. If a null value is returned, 
> this will result in a NullPointerException.



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

Reply via email to