SpotBugs Report

Project Information

Project: ActiveMQ :: OSGi bundle

SpotBugs version: 4.8.3

Code analyzed:



Metrics

96 lines of code analyzed, in 3 classes, in 1 packages.

Metric Total Density*
High Priority Warnings 0.00
Medium Priority Warnings 2 20.83
Total Warnings 2 20.83

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



Contents

Summary

Warning Type Number
Malicious code vulnerability Warnings 2
Total 2

Warnings

Click on a warning row to see full context information.

Malicious code vulnerability Warnings

Code Warning
EI org.apache.activemq.osgi.ActiveMQServiceFactory.getBundleContext() may expose internal representation by returning ActiveMQServiceFactory.bundleContext
EI2 org.apache.activemq.osgi.ActiveMQServiceFactory.setBundleContext(BundleContext) may expose internal representation by storing an externally mutable object into ActiveMQServiceFactory.bundleContext

Details

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.

EI_EXPOSE_REP2: May expose internal representation by incorporating reference to mutable object

This code stores a reference to an externally mutable object into 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. Storing a copy of the object is better approach in many situations.