[
https://issues.apache.org/jira/browse/OPENJPA-2206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Carman updated OPENJPA-2206:
----------------------------------
Description:
FindBugs is reporting this error on our enhanced classes. The pcIsDetached()
method appears to be the culprit. 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.
was:
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.
> 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. The pcIsDetached()
> method appears to be the culprit. 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