Project: ActiveMQ :: Web Console
SpotBugs version: 4.8.3
Code analyzed:
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)
Warning Type | Number |
---|---|
Correctness Warnings | 2 |
Malicious code vulnerability Warnings | 1 |
Performance Warnings | 1 |
Dodgy code Warnings | 1 |
Total | 5 |
Click on a warning row to see full context information.
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 |
Code | Warning |
---|---|
EI | org.apache.activemq.web.filter.ApplicationContextFilter.getServletContext() may expose internal representation by returning ApplicationContextFilter.servletContext |
Code | Warning |
---|---|
UrF | Unread field: org.apache.activemq.web.config.OsgiConfiguration.service |
Code | Warning |
---|---|
DLS | Dead store to path in org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ServletRequest, ServletResponse, FilterChain) |
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.
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.
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.
This field is never read. Consider removing it from the class.