You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Caleb Cushing (Jira)" <ji...@apache.org> on 2020/12/10 22:42:00 UTC

[jira] [Commented] (LANG-1598) Use JSR-305 (javax.annotation) for Null-Analysis to avoid unexpected NullPointerExceptions

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

Caleb Cushing commented on LANG-1598:
-------------------------------------

these days jetbrains annotations should be fine, most frameworks seem to support multiple ones since the javax ones don't all work anymore on the latest version of java. I came here because I've been playing with using the Checker Framework, and Checker says I can't pass `null` to `BooleanUtils.toBoolean` which explicitly states in the documentation that null is recognized as false.

As far as this being huge, maybe this could be done 1 class at a time? with periodic releases including said work. It doesn't all have to be done for some of it to be done.

> Use JSR-305 (javax.annotation) for Null-Analysis to avoid unexpected NullPointerExceptions
> ------------------------------------------------------------------------------------------
>
>                 Key: LANG-1598
>                 URL: https://issues.apache.org/jira/browse/LANG-1598
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 3.11
>            Reporter: Alexander Guril
>            Priority: Major
>              Labels: newbie
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Use the javax.annotation-API for Null-Analysis to avoid NPEs.
> {code:XML}
> <!-- https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305 -->
> <dependency>
>     <groupId>com.google.code.findbugs</groupId>
>     <artifactId>jsr305</artifactId>
>     <version>3.0.2</version>
> </dependency>
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)