SpotBugs Report

Project Information

Project: ActiveMQ :: Web Console

SpotBugs version: 4.8.3

Code analyzed:



Metrics

521 lines of code analyzed, in 18 classes, in 5 packages.

Metric Total Density*
High Priority Warnings 2 3.84
Medium Priority Warnings 3 5.76
Total Warnings 5 9.60

(* Defects per Thousand lines of non-commenting source statements)



Contents

Summary

Warning Type Number
Correctness Warnings 2
Malicious code vulnerability Warnings 1
Performance Warnings 1
Dodgy code Warnings 1
Total 5

Warnings

Click on a warning row to see full context information.

Correctness Warnings

Code Warning
UMAC Uncallable method org.apache.activemq.web.filter.ApplicationContextFilter$1.getContext() defined in anonymous class
UMAC Uncallable method org.apache.activemq.web.filter.ApplicationContextFilter$2.getContext() defined in anonymous class

Malicious code vulnerability Warnings

Code Warning
EI org.apache.activemq.web.filter.ApplicationContextFilter.getServletContext() may expose internal representation by returning ApplicationContextFilter.servletContext

Performance Warnings

Code Warning
UrF Unread field: org.apache.activemq.web.config.OsgiConfiguration.service

Dodgy code Warnings

Code Warning
DLS Dead store to path in org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ServletRequest, ServletResponse, FilterChain)

Details

DLS_DEAD_LOCAL_STORE: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because SpotBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

EI_EXPOSE_REP: May expose internal representation by returning reference to mutable object

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

UMAC_UNCALLABLE_METHOD_OF_ANONYMOUS_CLASS: Uncallable method defined in anonymous class

This anonymous class defines a method that is not directly invoked and does not override a method in a superclass. Since methods in other classes cannot directly invoke methods declared in an anonymous class, it seems that this method is uncallable. The method might simply be dead code, but it is also possible that the method is intended to override a method declared in a superclass, and due to a typo or other error the method does not, in fact, override the method it is intended to.

URF_UNREAD_FIELD: Unread field

This field is never read.  Consider removing it from the class.