OpenJPA
  1. OpenJPA
  2. OPENJPA-877

Findbugs problems with our generated enhanced code

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: kernel
    • Labels:
      None

      Description

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

      Thanks,
      Kevin

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Kevin Sutter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development