The following document contains the results of SpotBugs
SpotBugs Version is 4.7.1
Threshold is medium
Effort is default
Classes | Bugs | Errors | Missing Classes |
---|---|---|---|
34 | 17 | 0 | 0 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 | 87 | Medium |
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 | 283 | Medium |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |
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 |
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
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 |