Bug 58537 - ExtendedAccessLogValve inner AccessLogElement classes can be static
Summary: ExtendedAccessLogValve inner AccessLogElement classes can be static
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: PC Mac OS X 10.1
: P2 minor (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-25 21:13 UTC by Anthony Whitford
Modified: 2015-10-26 07:44 UTC (History)
0 users



Attachments
Add the static keyword to the inner AccessLogElement classes (2.61 KB, patch)
2015-10-25 21:13 UTC, Anthony Whitford
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Whitford 2015-10-25 21:13:46 UTC
Created attachment 33211 [details]
Add the static keyword to the inner AccessLogElement classes

There are several inner classes defined that subclass AccessLogElement that are not defined as static.

Since the inner classes do not use its embedded reference to the object which created it, the class may be made static to avoid keeping the reference to the creator object alive longer than necessary, and keeping the class instances lean.

See  http://findbugs.sourceforge.net/bugDescriptions.html#SIC_INNER_SHOULD_BE_STATIC
Comment 1 Violeta Georgieva 2015-10-26 07:44:14 UTC
Hi,

Thanks for the report and the patch.
The fix is available in trunk, 8.0.x (for 8.0.29 onwards) and 7.0.x (for 7.0.66 onwards)

Regards,
Violeta