SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.7.1

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
64 10 0 0

Files

Class Bugs
org.opentrafficsim.base.CompressedFileWriter 1
org.opentrafficsim.base.TimeStampedObject 2
org.opentrafficsim.base.compressedfiles.Reader 1
org.opentrafficsim.base.compressedfiles.Writer 1
org.opentrafficsim.base.parameters.ParameterSet 1
org.opentrafficsim.base.parameters.constraint.CollectionConstraint 1
org.opentrafficsim.base.parameters.constraint.MultiConstraint 1
org.opentrafficsim.base.parameters.constraint.NumericConstraint 1
org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint 1

org.opentrafficsim.base.CompressedFileWriter

Bug Category Details Line Priority
Found reliance on default encoding in org.opentrafficsim.base.CompressedFileWriter.create(String, boolean): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 60 High

org.opentrafficsim.base.TimeStampedObject

Bug Category Details Line Priority
org.opentrafficsim.base.TimeStampedObject.getTimestamp() may expose internal representation by returning TimeStampedObject.timestamp MALICIOUS_CODE EI_EXPOSE_REP 56 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 38 Medium

org.opentrafficsim.base.compressedfiles.Reader

Bug Category Details Line Priority
org.opentrafficsim.base.compressedfiles.Reader.autoDetectCompressionType(String) ignores result of java.io.BufferedInputStream.read(byte[]) BAD_PRACTICE RR_NOT_CHECKED 95 Medium

org.opentrafficsim.base.compressedfiles.Writer

Bug Category Details Line Priority
org.opentrafficsim.base.compressedfiles.Writer.createOutputStream(String, CompressionType) may fail to clean up java.io.OutputStream on checked exception EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE 50 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 297 Medium

org.opentrafficsim.base.parameters.constraint.CollectionConstraint

Bug Category Details Line Priority
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 53 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 102 Medium

org.opentrafficsim.base.parameters.constraint.SubCollectionConstraint

Bug Category Details Line Priority
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