Project: ActiveMQ :: Spring
SpotBugs version: 4.8.3
Code analyzed:
766 lines of code analyzed, in 22 classes, in 7 packages.
Metric | Total | Density* |
---|---|---|
High Priority Warnings | 2 | 2.61 |
Medium Priority Warnings | 9 | 11.75 |
Total Warnings | 11 | 14.36 |
(* Defects per Thousand lines of non-commenting source statements)
Warning Type | Number |
---|---|
Bad practice Warnings | 3 |
Malicious code vulnerability Warnings | 8 |
Total | 11 |
Click on a warning row to see full context information.
Code | Warning |
---|---|
Dm | org.apache.activemq.xbean.BrokerFactoryBean$1.run() invokes System.exit(...), which shuts down the entire virtual machine |
Nm | The class name org.apache.activemq.spring.ActiveMQConnectionFactory shadows the simple name of the superclass org.apache.activemq.ActiveMQConnectionFactory |
Nm | The class name org.apache.activemq.spring.ActiveMQXAConnectionFactory shadows the simple name of the superclass org.apache.activemq.ActiveMQXAConnectionFactory |
Code | Warning |
---|---|
EI | org.apache.activemq.pool.PooledConnectionFactoryBean.getObject() may expose internal representation by returning PooledConnectionFactoryBean.pooledConnectionFactory |
EI | org.apache.activemq.spring.ActiveMQConnectionFactoryFactoryBean.getTcpHostAndPorts() may expose internal representation by returning ActiveMQConnectionFactoryFactoryBean.tcpHostAndPorts |
EI | org.apache.activemq.store.PersistenceAdapterFactoryBean.getObject() may expose internal representation by returning PersistenceAdapterFactoryBean.persistenceAdaptor |
EI | org.apache.activemq.xbean.BrokerFactoryBean.getBroker() may expose internal representation by returning BrokerFactoryBean.broker |
EI | org.apache.activemq.xbean.BrokerFactoryBean.getObject() may expose internal representation by returning BrokerFactoryBean.broker |
EI2 | new org.apache.activemq.network.jms.JndiTemplateLookupFactory(JndiTemplate) may expose internal representation by storing an externally mutable object into JndiTemplateLookupFactory.template |
EI2 | org.apache.activemq.security.XBeanAuthorizationMap.setAuthorizationEntries(List) may expose internal representation by storing an externally mutable object into XBeanAuthorizationMap.authorizationEntries |
EI2 | org.apache.activemq.spring.ActiveMQConnectionFactoryFactoryBean.setTcpHostAndPorts(List) may expose internal representation by storing an externally mutable object into ActiveMQConnectionFactoryFactoryBean.tcpHostAndPorts |
Invoking System.exit shuts down the entire Java virtual machine. This should only been done when it is appropriate. Such calls make it hard or impossible for your code to be invoked by other code. Consider throwing a RuntimeException instead.
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 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.
This class has a simple name that is identical to that of its superclass, except
that its superclass is in a different package (e.g., alpha.Foo
extends beta.Foo
).
This can be exceptionally confusing, create lots of situations in which you have to look at import statements
to resolve references and creates many
opportunities to accidentally define methods that do not override methods in their superclasses.