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 |
78 |
35 |
0 |
0 |
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 |
45 |
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 |
57 |
Medium |
org.opentrafficsim.base.HierarchicalType.getChildren() may expose internal representation by returning HierarchicalType.children |
MALICIOUS_CODE |
EI_EXPOSE_REP |
87 |
Medium |
org.opentrafficsim.base.Resource
Bug |
Category |
Details |
Line |
Priority |
org.opentrafficsim.base.Resource.getResourceAsUri(String) may fail to clean up java.io.InputStream |
EXPERIMENTAL |
OBL_UNSATISFIED_OBLIGATION |
54 |
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 |
23 |
Medium |
org.opentrafficsim.base.StripeElement.width() may expose internal representation by returning StripeElement.width |
MALICIOUS_CODE |
EI_EXPOSE_REP |
23 |
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 |
34 |
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 |
34 |
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 |
20 |
Medium |
new org.opentrafficsim.base.TimeStampedObject(Object, Time) may expose internal representation by storing an externally mutable object into TimeStampedObject.timestamp |
MALICIOUS_CODE |
EI_EXPOSE_REP2 |
20 |
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 |
36 |
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 |
46 |
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 |
38 |
Medium |
org.opentrafficsim.base.geometry.DirectionalPolyLine.getEndDirection() may expose internal representation by returning DirectionalPolyLine.endDirection |
MALICIOUS_CODE |
EI_EXPOSE_REP |
122 |
Medium |
org.opentrafficsim.base.geometry.DirectionalPolyLine.getStartDirection() may expose internal representation by returning DirectionalPolyLine.startDirection |
MALICIOUS_CODE |
EI_EXPOSE_REP |
113 |
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 |
41 |
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 |
40 |
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 |
233 |
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 |
52 |
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 |
82 |
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 |
288 |
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 |
50 |
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 |
75 |
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 |
89 |
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 |
105 |
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 |
63 |
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 |
95 |
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 |
31 |
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 |
32 |
Medium |