openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OPENJPA-2206) Bad practice - Method with Boolean return type returns explicit null
Date Fri, 01 Jun 2012 18:23:22 GMT
James Carman created OPENJPA-2206:
-------------------------------------

             Summary: Bad practice - Method with Boolean return type returns explicit null
                 Key: OPENJPA-2206
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2206
             Project: OpenJPA
          Issue Type: Bug
          Components: Enhance
    Affects Versions: 2.2.0
            Reporter: James Carman


FindBugs is reporting this error on our enhanced classes.  Details about the error:

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

        

Mime
View raw message