Project: /export/home/daveho/commons-modeler-1.1/commons-modeler.fb
FindBugs version: 0.8.7
Code analyzed:
Click on a warning row to see full context information.
Code | Warning |
---|---|
IL | There is an apparent infinite recursive loop in org.apache.commons.modeler.Registry.setServer(javax.management.MBeanServer). |
NP | Read of unwritten field in org.apache.commons.modeler.JndiJmx.handleNotification(javax.management.Notification,Object) |
NP | Read of unwritten field in org.apache.commons.modeler.mbeans.SimpleRemoteConnector.refreshAttributes() |
NP | Possible null pointer dereference in org.apache.commons.modeler.Registry.findManagedBeans(String) |
NP | Possible null pointer dereference in org.apache.commons.modeler.util.IntrospectionUtils.findMethod(Class,String,Class[]) |
UCF | Useless control flow in org.apache.commons.modeler.BaseNotificationBroadcaster.registerNotifications(FixedNotificationFilter) |
UwF | Unwritten field: org.apache.commons.modeler.JndiJmx.mserver |
UwF | Unwritten field: org.apache.commons.modeler.mbeans.SimpleRemoteConnector.mserver |
Code | Warning |
---|
Code | Warning |
---|---|
IS2 | Inconsistent synchronization of org.apache.commons.modeler.Registry.server; locked 66% of time |
Code | Warning |
---|---|
EI | org.apache.commons.modeler.ConstructorInfo.getSignature() may expose internal representation by returning org.apache.commons.modeler.ConstructorInfo.parameters |
EI | org.apache.commons.modeler.ManagedBean.getAttributes() may expose internal representation by returning org.apache.commons.modeler.ManagedBean.attributes |
EI | org.apache.commons.modeler.ManagedBean.getConstructors() may expose internal representation by returning org.apache.commons.modeler.ManagedBean.constructors |
EI | org.apache.commons.modeler.ManagedBean.getNotifications() may expose internal representation by returning org.apache.commons.modeler.ManagedBean.notifications |
EI | org.apache.commons.modeler.ManagedBean.getOperations() may expose internal representation by returning org.apache.commons.modeler.ManagedBean.operations |
EI | org.apache.commons.modeler.NotificationInfo.getNotifTypes() may expose internal representation by returning org.apache.commons.modeler.NotificationInfo.notifTypes |
EI | org.apache.commons.modeler.OperationInfo.getSignature() may expose internal representation by returning org.apache.commons.modeler.OperationInfo.parameters |
MS | org.apache.commons.modeler.Registry.MODELER_MANIFEST isn't final but should be |
MS | org.apache.commons.modeler.util.IntrospectionUtils.PATH_SEPARATOR isn't final but should be |
Code | Warning |
---|---|
Dm | org.apache.commons.modeler.Registry.convertValue(String,String) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead |
Dm | org.apache.commons.modeler.util.IntrospectionUtils.setProperty(Object,String,String) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead |
UrF | Unread field: org.apache.commons.modeler.ant.MLETTask.archive |
UrF | Unread field: org.apache.commons.modeler.ant.MLETTask.codebase |
UrF | Unread field: org.apache.commons.modeler.ant.ModelerTask.log |
UrF | Unread field: org.apache.commons.modeler.ant.RegistryTask.log |
UrF | Unread field: org.apache.commons.modeler.BaseNotificationBroadcaster.hookCount |
UrF | Unread field: org.apache.commons.modeler.mbeans.SimpleRemoteConnector.prefix |
UrF | Unread field: org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.type |
UrF | Unread field: org.apache.commons.modeler.modules.MbeansDescriptorsSerSource.type |
UrF | Unread field: org.apache.commons.modeler.modules.MbeansSource.type |
UrF | Unread field: org.apache.commons.modeler.Registry.key |
UuF | Unused field: org.apache.commons.modeler.ant.MLETTask.loaderRef |
UuF | Unused field: org.apache.commons.modeler.mbeans.SimpleRemoteConnector.localDomain |
WMI | Method org.apache.commons.modeler.mbeans.SimpleRemoteConnector.refreshAttributes() makes inefficient use of keySet iterator instead of entrySet iterator |
Code | Warning |
---|---|
CD | Class org.apache.commons.modeler.mbeans.SimpleRemoteConnector has a circular dependency with other classes. |
DLS | Dead store to local variable in method org.apache.commons.modeler.BaseModelMBean.setAttributes(javax.management.AttributeList) |
REC | Method org.apache.commons.modeler.modules.MbeansSource.execute() catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught |
REC | Method org.apache.commons.modeler.modules.MbeansSource.execute() catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught |
REC | Method org.apache.commons.modeler.util.IntrospectionUtils.setProperty(Object,String) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught |
This class has a circular dependency with other classes. This makes building these classes difficult, as each is dependent on the other to build correctly. Consider using interfaces to break the hard dependency.
This instruction assigns a value to a local variable, but the value is not read by any subsequent instruction. Often, this indicates an error, because the value computed is never used.
Creating new instances of java.lang.Boolean
wastes
memory, since Boolean
objects are immutable and there are
only two useful values of this type. Use the Boolean.valueOf()
method to create Boolean
objects 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 method unconditionally invokes itself. This would seem to indicate an infinite recursive loop that will result in a stack overflow.
The fields of this class appear to be accessed inconsistently with respect to synchronization. This bug report indicates that the bug pattern detector judged that
A typical bug matching this bug pattern is forgetting to synchronize one of the methods in a class that is intended to be thread-safe.
You can select the nodes labeled "Unsynchronized access" to show the code locations where the detector believed that a field was accessed without synchronization.
Note that there are various sources of inaccuracy in this detector; for example, the detector cannot statically detect all situations in which a lock is held. Also, even when the detector is accurate in distinguishing locked vs. unlocked accesses, the code in question may still be correct.
This description refers to the "IS2" version of the pattern detector, which has more accurate ways of detecting locked vs. unlocked accesses than the older "IS" detector.
A mutable static field could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.
A reference value dereferenced here might be null at runtime.
This may lead to a NullPointerException
when the code is executed.
The program is deferencing a field that does not seem to ever be written to. Deferencing this value will generate a null pointer exception.
This method uses a try-catch block that catches Exception objects, but Exception is not thrown within the try block, and RuntimeException is not explicitly caught. It is a common bug pattern to say try { ... } catch (Exception e) { something } as a shorthand for catching a number of types of exception each of whose catch blocks is identical, but this construct also accidentally catches RuntimeException as well, masking potential bugs.
This method contains a useless control flow statement.
Often, this is caused by inadvertently using an empty statement as the
body of an if
statement, e.g.:
if (argv.length == 1); System.out.println("Hello, " + argv[0]);
This field is never read. Consider removing it from the class.
This field is never used. Consider removing it from the class.
This field is never written. All reads of it will return the default value. Check for errors (should it have been initialized?), or remove it if it is useless.
This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.