Affects Version/s: None
Fix Version/s: None
A co-worker "accidentally" ran findbugs against some openjpa bytecode enhanced Entities and found a few issues. This JIRA Issue will be used to document his findings:
We recently started running Findbugs to try to find problems. Due to the way we did this we ended up running it against some JPA enhanced entities, rather than the pre-enhanced classes and Findbugs picks up some "problems".
One problem it picks up is that there is a method with a Boolean return type that returns null. I guess this complaint comes in because that can cause an NPE if it were to be autoboxed.
The other problem is that there is some code doing something like new Integer(2) rather than Integer.valueOf(2), the latter having better performance because it caches.
Both these "problems" are introduced by the JPA enhancement so I am not worried about them and will disable these checks, but I thought I would let you know what I found.