[GLASSFISH-5209] Findbug-detected issues and enhancements Created: 25/Jun/08  Updated: 04/Jan/13  Resolved: 04/Jan/13

Status: Resolved
Project: glassfish
Component/s: other
Affects Version/s: V3
Fix Version/s: 4.0

Type: Task Priority: Major
Reporter: jpz Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Attachments: Text File ejb-container.patch     Text File kernel.patch     Text File security.patch    
Issuezilla Id: 5,209


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.


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


Various streams not being closed.

Internal classes made static for performance improvements.

String concatenations using a StringBuffer rather than + ...


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

Comment by jpz [ 25/Jun/08 ]

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

Comment by jpz [ 25/Jun/08 ]

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

Comment by jpz [ 25/Jun/08 ]

Created an attachment (id=1580)
security module patch

Comment by Tom Mueller [ 06/Mar/12 ]

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

Comment by Tom Mueller [ 04/Jan/13 ]

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.

Generated at Fri Mar 24 03:30:32 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.