<< Back to previous view

[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
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


File Attachments: Text File ejb-container.patch     Text File kernel.patch     Text File security.patch    
Issuezilla Id: 5,209
Tags:
Participants: jpz and Tom Mueller

 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



 Comments   
Comment by jpz [ 25/Jun/08 01:14 AM ]

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

Comment by jpz [ 25/Jun/08 01:15 AM ]

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

Comment by jpz [ 25/Jun/08 01:15 AM ]

Created an attachment (id=1580)
security module patch

Comment by Tom Mueller [ 06/Mar/12 09:59 PM ]

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 03:44 PM ]

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 Apr 18 14:55:31 UTC 2014 using JIRA 4.0.2#472.