glassfish
  1. glassfish
  2. GLASSFISH-5209

Findbug-detected issues and enhancements

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: 4.0
    • Component/s: other
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      5,209

      Description

      I checked out the code from V3-trunk and ran Findbugs on some of the modules.

      I identified a few worthwhile issues in 3 modules: ejb-container, kernel and
      security. This should be tempered by the fact that some portions of the code are
      clearly "work in progress", and that v3 is still in development.

      I did not have enough time to check some other modules, but I will update the
      patches should I be able to devote some time on this type of work.

      Please find some details below.

      jb-container
      =============

      Self-assigned instance variable, probably just a typo (PATCH): BaseContainer

      ContainerFactoryImpl: l99 / l102: local variable container may be null

      Primitive classes performance issues: Java 5 is required anyway, so it's better
      to handle those manipulations efficiently using valueOf(...) calls.

      Internal classes -> static internal classes for performance improvements in:
      EJBTimerService.TimerCache, EjbContainerUtilImpl.TxData and MethodMap.MethodInfo

      Stream not always closed: EJBTimerService, HandleDelegateUtil

      Kernel
      ======

      Various streams not being closed.

      Internal classes made static for performance improvements.

      String concatenations using a StringBuffer rather than + ...

      Security
      ========

      String comparison using .equals() rather than ==

      Null dereferencements:

      • BaseContainerCallbackHandler on certStorre variable
      • AuthMessagePolicy on msgSecDesc

      toString() on array: JDBCLoginModule.

      Internal classes made static for performance improvements.

      Primitives / valueOf()

      Useless String allocations

      1. ejb-container.patch
        13 kB
        jpz
      2. kernel.patch
        7 kB
        jpz
      3. security.patch
        11 kB
        jpz

        Activity

        Hide
        Tom Mueller added a comment -

        Use of the findbugs program has been integrated into the GlassFish development process. Currently, no high priority issues exist in the code, and if any are introduced developers are notified immediately after a hudson job runs. Certain medium and low priority bugs are also detected by a hudson job and developers are notified weekly. Significant progress has been made in reducing these low priority findbugs errors.

        Marking this issue as resolved.

        Show
        Tom Mueller added a comment - Use of the findbugs program has been integrated into the GlassFish development process. Currently, no high priority issues exist in the code, and if any are introduced developers are notified immediately after a hudson job runs. Certain medium and low priority bugs are also detected by a hudson job and developers are notified weekly. Significant progress has been made in reducing these low priority findbugs errors. Marking this issue as resolved.
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Hide
        jpz added a comment -

        Created an attachment (id=1580)
        security module patch

        Show
        jpz added a comment - Created an attachment (id=1580) security module patch
        Hide
        jpz added a comment -

        Created an attachment (id=1579)
        kernel-module patch

        Show
        jpz added a comment - Created an attachment (id=1579) kernel-module patch
        Hide
        jpz added a comment -

        Created an attachment (id=1578)
        ejb-container module patch

        Show
        jpz added a comment - Created an attachment (id=1578) ejb-container module patch

          People

          • Assignee:
            Tom Mueller
            Reporter:
            jpz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: