SpotBugs Bug Detector Report
The following document contains the results of SpotBugs
SpotBugs Version is 4.8.6
Threshold is medium
Effort is default
Summary
Classes |
Bugs |
Errors |
Missing Classes |
34 |
27 |
0 |
0 |
org.opentrafficsim.sim0mq.publisher.AbstractIdTransceiver
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.AbstractIdTransceiver at new org.opentrafficsim.sim0mq.publisher.AbstractIdTransceiver(Network, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
37 |
Medium |
new org.opentrafficsim.sim0mq.publisher.AbstractIdTransceiver(Network, String) may expose internal representation by storing an externally mutable object into AbstractIdTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
38 |
Medium |
org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.AbstractTransceiver at new org.opentrafficsim.sim0mq.publisher.AbstractTransceiver(String, MetaData, MetaData) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
36 |
Medium |
org.opentrafficsim.sim0mq.publisher.CrossSectionElementTransceiver
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.sim0mq.publisher.CrossSectionElementTransceiver(Network) may expose internal representation by storing an externally mutable object into CrossSectionElementTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
49 |
Medium |
org.opentrafficsim.sim0mq.publisher.EventMultiplexer
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.EventMultiplexer at new org.opentrafficsim.sim0mq.publisher.EventMultiplexer(OtsSimulatorInterface) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
129 |
Medium |
org.opentrafficsim.sim0mq.publisher.GtuTransceiver
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.sim0mq.publisher.GtuTransceiver(Network, GtuIdTransceiver) may expose internal representation by storing an externally mutable object into GtuTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
44 |
Medium |
org.opentrafficsim.sim0mq.publisher.LaneGtuIdTransceiver
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.LaneGtuIdTransceiver at new org.opentrafficsim.sim0mq.publisher.LaneGtuIdTransceiver(Network) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
45 |
Medium |
new org.opentrafficsim.sim0mq.publisher.LaneGtuIdTransceiver(Network) may expose internal representation by storing an externally mutable object into LaneGtuIdTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
46 |
Medium |
org.opentrafficsim.sim0mq.publisher.LinkGtuIdTransceiver
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.LinkGtuIdTransceiver at new org.opentrafficsim.sim0mq.publisher.LinkGtuIdTransceiver(Network) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
41 |
Medium |
new org.opentrafficsim.sim0mq.publisher.LinkGtuIdTransceiver(Network) may expose internal representation by storing an externally mutable object into LinkGtuIdTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
42 |
Medium |
org.opentrafficsim.sim0mq.publisher.LinkTransceiver
Bug |
Category |
Details |
Line |
Priority |
instanceof will always return true for all non-null values in org.opentrafficsim.sim0mq.publisher.LinkTransceiver.get(Object[], ReturnWrapper), since all org.opentrafficsim.core.network.Link are instances of org.opentrafficsim.core.network.Link |
STYLE |
BC_VACUOUS_INSTANCEOF |
76 |
Medium |
new org.opentrafficsim.sim0mq.publisher.LinkTransceiver(Network, LinkIdTransceiver) may expose internal representation by storing an externally mutable object into LinkTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
54 |
Medium |
org.opentrafficsim.sim0mq.publisher.NodeTransceiver
Bug |
Category |
Details |
Line |
Priority |
new org.opentrafficsim.sim0mq.publisher.NodeTransceiver(Network, NodeIdTransceiver) may expose internal representation by storing an externally mutable object into NodeTransceiver.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
50 |
Medium |
org.opentrafficsim.sim0mq.publisher.Publisher
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.Publisher at new org.opentrafficsim.sim0mq.publisher.Publisher(Network) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
66 |
Medium |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.Publisher at new org.opentrafficsim.sim0mq.publisher.Publisher(Network, List, List) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
81 |
Medium |
new org.opentrafficsim.sim0mq.publisher.Publisher(Network, List, List) may expose internal representation by storing an externally mutable object into Publisher.network |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
86 |
Medium |
org.opentrafficsim.sim0mq.publisher.Publisher$6
Bug |
Category |
Details |
Line |
Priority |
instanceof will always return true for all non-null values in org.opentrafficsim.sim0mq.publisher.Publisher$6.lookup(Object[], ReturnWrapper), since all org.opentrafficsim.core.network.Link are instances of org.djutils.event.EventProducer |
STYLE |
BC_VACUOUS_INSTANCEOF |
282 |
Medium |
org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl at new org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl(ZContext, byte[], Map, AtomicInteger) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
61 |
Medium |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl at new org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl(ZContext, Object[], Map) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
72 |
Medium |
new org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl(ZContext, Object[], Map) may expose internal representation by storing an externally mutable object into ReturnWrapperImpl.socketMap |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
75 |
Medium |
new org.opentrafficsim.sim0mq.publisher.ReturnWrapperImpl(ZContext, Object[], Map) may expose internal representation by storing an externally mutable object into ReturnWrapperImpl.zContext |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
74 |
Medium |
org.opentrafficsim.sim0mq.publisher.Subscription
Bug |
Category |
Details |
Line |
Priority |
Unchecked/unconfirmed cast from org.djutils.event.Event to org.djutils.event.TimedEvent in org.opentrafficsim.sim0mq.publisher.Subscription.notify(Event) |
STYLE |
BC_UNCONFIRMED_CAST |
554 |
Medium |
instanceof will always return true for all non-null values in org.opentrafficsim.sim0mq.publisher.Subscription.notify(Event), since all org.djutils.event.EventType are instances of org.djutils.event.EventType |
STYLE |
BC_VACUOUS_INSTANCEOF |
549 |
Medium |
org.opentrafficsim.sim0mq.publisher.SubscriptionHandler
Bug |
Category |
Details |
Line |
Priority |
Exception thrown in class org.opentrafficsim.sim0mq.publisher.SubscriptionHandler at new org.opentrafficsim.sim0mq.publisher.SubscriptionHandler(String, TransceiverInterface, LookupEventProducer, EventType, EventType, EventType, SubscriptionHandler) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
75 |
Medium |
Possible null pointer dereference of SubscriptionHandler.listTransceiver in org.opentrafficsim.sim0mq.publisher.SubscriptionHandler.executeCommand(SubscriptionHandler$Command, Object[], ReturnWrapper) |
CORRECTNESS |
NP_NULL_ON_SOME_PATH |
409 |
High |
Possible null pointer dereference of SubscriptionHandler.listTransceiver in org.opentrafficsim.sim0mq.publisher.SubscriptionHandler.executeCommand(SubscriptionHandler$Command, Object[], ReturnWrapper) |
CORRECTNESS |
NP_NULL_ON_SOME_PATH |
418 |
High |
Nullcheck of SubscriptionHandler.listTransceiver at line 462 of value previously dereferenced in org.opentrafficsim.sim0mq.publisher.SubscriptionHandler.executeCommand(SubscriptionHandler$Command, Object[], ReturnWrapper) |
CORRECTNESS |
RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE |
454 |
Medium |