SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.9.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
76 35 0 0

Files

Class Bugs
org.opentrafficsim.base.HierarchicalType 3
org.opentrafficsim.base.StripeElement 4
org.opentrafficsim.base.TimeStampedObject 2
org.opentrafficsim.base.geometry.CircleShape 2
org.opentrafficsim.base.geometry.DirectionalPolyLine 6
org.opentrafficsim.base.geometry.OtsLine2d 2
org.opentrafficsim.base.geometry.RoundedRectangleShape 2
org.opentrafficsim.base.logger.Logger 1
org.opentrafficsim.base.parameters.ParameterSet 1
org.opentrafficsim.base.parameters.ParameterType 5
org.opentrafficsim.base.parameters.constraint.CollectionConstraint 2
org.opentrafficsim.base.parameters.constraint.MultiConstraint 1
org.opentrafficsim.base.parameters.constraint.NumericConstraint 1
org.opentrafficsim.base.parameters.constraint.SingleBound$Bound 1
org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint 2

org.opentrafficsim.base.HierarchicalType

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.HierarchicalType at new org.opentrafficsim.base.HierarchicalType(String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 43 Medium
Exception thrown in class org.opentrafficsim.base.HierarchicalType at new org.opentrafficsim.base.HierarchicalType(String, HierarchicalType) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 55 Medium
org.opentrafficsim.base.HierarchicalType.getChildren() may expose internal representation by returning HierarchicalType.children MALICIOUS_CODE EI_EXPOSE_REP 85 Medium

org.opentrafficsim.base.StripeElement

Bug Category Details Line Priority
org.opentrafficsim.base.StripeElement.dashes() may expose internal representation by returning StripeElement.dashes MALICIOUS_CODE EI_EXPOSE_REP 22 Medium
org.opentrafficsim.base.StripeElement.width() may expose internal representation by returning StripeElement.width MALICIOUS_CODE EI_EXPOSE_REP 22 Medium
new org.opentrafficsim.base.StripeElement(Length, Color, LengthVector) may expose internal representation by storing an externally mutable object into StripeElement.dashes MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium
new org.opentrafficsim.base.StripeElement(Length, Color, LengthVector) may expose internal representation by storing an externally mutable object into StripeElement.width MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium

org.opentrafficsim.base.TimeStampedObject

Bug Category Details Line Priority
org.opentrafficsim.base.TimeStampedObject.timestamp() may expose internal representation by returning TimeStampedObject.timestamp MALICIOUS_CODE EI_EXPOSE_REP 18 Medium
new org.opentrafficsim.base.TimeStampedObject(Object, Duration) may expose internal representation by storing an externally mutable object into TimeStampedObject.timestamp MALICIOUS_CODE EI_EXPOSE_REP2 18 Medium

org.opentrafficsim.base.geometry.CircleShape

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.geometry.CircleShape at new org.opentrafficsim.base.geometry.CircleShape(double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 40 Medium
Exception thrown in class org.opentrafficsim.base.geometry.CircleShape at new org.opentrafficsim.base.geometry.CircleShape(double, int) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 50 Medium

org.opentrafficsim.base.geometry.DirectionalPolyLine

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.geometry.DirectionalPolyLine at new org.opentrafficsim.base.geometry.DirectionalPolyLine(PolyLine2d, Direction, Direction) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 35 Medium
org.opentrafficsim.base.geometry.DirectionalPolyLine.getEndDirection() may expose internal representation by returning DirectionalPolyLine.endDirection MALICIOUS_CODE EI_EXPOSE_REP 119 Medium
org.opentrafficsim.base.geometry.DirectionalPolyLine.getStartDirection() may expose internal representation by returning DirectionalPolyLine.startDirection MALICIOUS_CODE EI_EXPOSE_REP 110 Medium
new org.opentrafficsim.base.geometry.DirectionalPolyLine(PolyLine2d, Direction, Direction) may expose internal representation by storing an externally mutable object into DirectionalPolyLine.endDirection MALICIOUS_CODE EI_EXPOSE_REP2 38 Medium
new org.opentrafficsim.base.geometry.DirectionalPolyLine(PolyLine2d, Direction, Direction) may expose internal representation by storing an externally mutable object into DirectionalPolyLine.startDirection MALICIOUS_CODE EI_EXPOSE_REP2 37 Medium
org.opentrafficsim.base.geometry.DirectionalPolyLine doesn't override org.djutils.draw.line.PolyLine2d.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.base.geometry.OtsLine2d

Bug Category Details Line Priority
org.opentrafficsim.base.geometry.OtsLine2d.getTypedLength() may expose internal representation by returning OtsLine2d.length MALICIOUS_CODE EI_EXPOSE_REP 234 Medium
org.opentrafficsim.base.geometry.OtsLine2d doesn't override org.djutils.draw.line.PolyLine2d.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 1 Medium

org.opentrafficsim.base.geometry.RoundedRectangleShape

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.geometry.RoundedRectangleShape at new org.opentrafficsim.base.geometry.RoundedRectangleShape(double, double, double) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 50 Medium
Exception thrown in class org.opentrafficsim.base.geometry.RoundedRectangleShape at new org.opentrafficsim.base.geometry.RoundedRectangleShape(double, double, double, int) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 80 Medium

org.opentrafficsim.base.logger.Logger

Bug Category Details Line Priority
Public static org.opentrafficsim.base.logger.Logger.ots() may expose internal representation by returning Logger.LOGGER MALICIOUS_CODE MS_EXPOSE_REP 94 Medium

org.opentrafficsim.base.parameters.ParameterSet

Bug Category Details Line Priority
org.opentrafficsim.base.parameters.ParameterSet.setAllOneByOne(Parameters) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 306 Medium

org.opentrafficsim.base.parameters.ParameterType

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.parameters.ParameterType at new org.opentrafficsim.base.parameters.ParameterType(String, String, Class) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 46 Medium
Exception thrown in class org.opentrafficsim.base.parameters.ParameterType at new org.opentrafficsim.base.parameters.ParameterType(String, String, Class, Object) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 71 Medium
Exception thrown in class org.opentrafficsim.base.parameters.ParameterType at new org.opentrafficsim.base.parameters.ParameterType(String, String, Class, Object, Constraint) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 85 Medium
Exception thrown in class org.opentrafficsim.base.parameters.ParameterType at new org.opentrafficsim.base.parameters.ParameterType(String, String, Class, Object, Constraint, boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 101 Medium
Exception thrown in class org.opentrafficsim.base.parameters.ParameterType at new org.opentrafficsim.base.parameters.ParameterType(String, String, Class, Constraint) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 59 Medium

org.opentrafficsim.base.parameters.constraint.CollectionConstraint

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.parameters.constraint.CollectionConstraint at new org.opentrafficsim.base.parameters.constraint.CollectionConstraint(Collection) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 32 Medium
new org.opentrafficsim.base.parameters.constraint.CollectionConstraint(Collection) may expose internal representation by storing an externally mutable object into CollectionConstraint.objects MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium

org.opentrafficsim.base.parameters.constraint.MultiConstraint

Bug Category Details Line Priority
new org.opentrafficsim.base.parameters.constraint.MultiConstraint(Set) may expose internal representation by storing an externally mutable object into MultiConstraint.constraints MALICIOUS_CODE EI_EXPOSE_REP2 52 Medium

org.opentrafficsim.base.parameters.constraint.NumericConstraint

Bug Category Details Line Priority
Return value of String.format(String, Object[]) ignored in new org.opentrafficsim.base.parameters.constraint.NumericConstraint(String, int, String) CORRECTNESS RV_RETURN_VALUE_IGNORED 96 Medium

org.opentrafficsim.base.parameters.constraint.SingleBound$Bound

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.parameters.constraint.SingleBound$Bound at new org.opentrafficsim.base.parameters.constraint.SingleBound$Bound(Number, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 224 Medium

org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint

Bug Category Details Line Priority
Exception thrown in class org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint at new org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint(Collection) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 32 Medium
new org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint(Collection) may expose internal representation by storing an externally mutable object into SubCollectionConstraint.objects MALICIOUS_CODE EI_EXPOSE_REP2 33 Medium