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
122 30 0 0

Files

Class Bugs
org.djutils.base.MutableDouble 1
org.djutils.base.MutableFloat 1
org.djutils.decoderdumper.Dumper 1
org.djutils.event.EventListener 1
org.djutils.event.EventProducer 1
org.djutils.event.LocalEventProducer 1
org.djutils.event.collection.EventProducingCollection 1
org.djutils.event.collection.EventProducingIterator 1
org.djutils.event.collection.EventProducingList 1
org.djutils.event.collection.EventProducingMap 1
org.djutils.event.collection.EventProducingSet 1
org.djutils.event.rmi.RmiEventProducer 1
org.djutils.immutablecollections.ImmutableIterator 1
org.djutils.immutablecollections.ImmutableMap$ImmutableEntry 1
org.djutils.io.CompressedFileWriter 4
org.djutils.polynomialroots.PolynomialRoots 4
org.djutils.polynomialroots.PolynomialRoots2 2
org.djutils.quadtree.QuadTree$SubTree 1
org.djutils.traceverifier.TraceVerifier 5

org.djutils.base.MutableDouble

Bug Category Details Line Priority
Test for floating point equality in org.djutils.base.MutableDouble.equals(Object) STYLE FE_FLOATING_POINT_EQUALITY 117 High

org.djutils.base.MutableFloat

Bug Category Details Line Priority
Test for floating point equality in org.djutils.base.MutableFloat.equals(Object) STYLE FE_FLOATING_POINT_EQUALITY 117 High

org.djutils.decoderdumper.Dumper

Bug Category Details Line Priority
org.djutils.decoderdumper.Dumper.setOutputStream(OutputStream) may expose internal representation by storing an externally mutable object into Dumper.outputStream MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium

org.djutils.event.EventListener

Bug Category Details Line Priority
The class name org.djutils.event.EventListener shadows the simple name of implemented interface java.util.EventListener BAD_PRACTICE NM_SAME_SIMPLE_NAME_AS_INTERFACE Not available Medium

org.djutils.event.EventProducer

Bug Category Details Line Priority
org.djutils.event.EventProducer.removeAllListeners(Class) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 183 Medium

org.djutils.event.LocalEventProducer

Bug Category Details Line Priority
org.djutils.event.LocalEventProducer.getEventListenerMap() may expose internal representation by returning LocalEventProducer.eventListenerMap MALICIOUS_CODE EI_EXPOSE_REP 48 Medium

org.djutils.event.collection.EventProducingCollection

Bug Category Details Line Priority
new org.djutils.event.collection.EventProducingCollection(Collection) may expose internal representation by storing an externally mutable object into EventProducingCollection.wrappedCollection MALICIOUS_CODE EI_EXPOSE_REP2 61 Medium

org.djutils.event.collection.EventProducingIterator

Bug Category Details Line Priority
new org.djutils.event.collection.EventProducingIterator(Iterator) may expose internal representation by storing an externally mutable object into EventProducingIterator.wrappedIterator MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium

org.djutils.event.collection.EventProducingList

Bug Category Details Line Priority
new org.djutils.event.collection.EventProducingList(List) may expose internal representation by storing an externally mutable object into EventProducingList.wrappedList MALICIOUS_CODE EI_EXPOSE_REP2 62 Medium

org.djutils.event.collection.EventProducingMap

Bug Category Details Line Priority
new org.djutils.event.collection.EventProducingMap(Map) may expose internal representation by storing an externally mutable object into EventProducingMap.wrappedMap MALICIOUS_CODE EI_EXPOSE_REP2 61 Medium

org.djutils.event.collection.EventProducingSet

Bug Category Details Line Priority
new org.djutils.event.collection.EventProducingSet(Set) may expose internal representation by storing an externally mutable object into EventProducingSet.wrappedSet MALICIOUS_CODE EI_EXPOSE_REP2 62 Medium

org.djutils.event.rmi.RmiEventProducer

Bug Category Details Line Priority
org.djutils.event.rmi.RmiEventProducer.getEventListenerMap() may expose internal representation by returning RmiEventProducer.eventListenerMap MALICIOUS_CODE EI_EXPOSE_REP 90 Medium

org.djutils.immutablecollections.ImmutableIterator

Bug Category Details Line Priority
new org.djutils.immutablecollections.ImmutableIterator(Iterator) may expose internal representation by storing an externally mutable object into ImmutableIterator.iterator MALICIOUS_CODE EI_EXPOSE_REP2 28 Medium

org.djutils.immutablecollections.ImmutableMap$ImmutableEntry

Bug Category Details Line Priority
new org.djutils.immutablecollections.ImmutableMap$ImmutableEntry(Map$Entry) may expose internal representation by storing an externally mutable object into ImmutableMap$ImmutableEntry.wrappedEntry MALICIOUS_CODE EI_EXPOSE_REP2 431 Medium

org.djutils.io.CompressedFileWriter

Bug Category Details Line Priority
Found reliance on default encoding in new org.djutils.io.CompressedFileWriter(String): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 59 High
Found reliance on default encoding in org.djutils.io.CompressedFileWriter.create(String, boolean): new java.io.FileWriter(String) I18N DM_DEFAULT_ENCODING 105 High
Found reliance on default encoding in org.djutils.io.CompressedFileWriter.create(String, boolean): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 103 High
org.djutils.io.CompressedFileWriter.next(String) may expose internal representation by returning CompressedFileWriter.bufferedWriter MALICIOUS_CODE EI_EXPOSE_REP 73 Medium

org.djutils.polynomialroots.PolynomialRoots

Bug Category Details Line Priority
Dead store to p1 in org.djutils.polynomialroots.PolynomialRoots.cubicRoots(double, double, double, boolean) STYLE DLS_DEAD_LOCAL_STORE 462 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 692 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 1257 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 1471 Medium

org.djutils.polynomialroots.PolynomialRoots2

Bug Category Details Line Priority
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 604 Medium
Using floating-point loop counters can lead to unexpected behavior. CORRECTNESS FL_FLOATS_AS_LOOP_COUNTERS 533 Medium

org.djutils.quadtree.QuadTree$SubTree

Bug Category Details Line Priority
org.djutils.quadtree.QuadTree$SubTree is serializable and an inner class BAD_PRACTICE SE_INNER_CLASS 275-602 Medium

org.djutils.traceverifier.TraceVerifier

Bug Category Details Line Priority
Found reliance on default encoding in new org.djutils.traceverifier.TraceVerifier(String): new java.io.FileReader(String) I18N DM_DEFAULT_ENCODING 47 High
Found reliance on default encoding in new org.djutils.traceverifier.TraceVerifier(String): new java.io.FileWriter(String) I18N DM_DEFAULT_ENCODING 54 High
Found reliance on default encoding in org.djutils.traceverifier.TraceVerifier.sample(String, String): new java.io.FileWriter(String, boolean) I18N DM_DEFAULT_ENCODING 89 High
Dereference of the result of readLine() without nullcheck in org.djutils.traceverifier.TraceVerifier.sample(String, String) STYLE NP_DEREFERENCE_OF_READLINE_VALUE 73 Medium
Format string should use %n rather than \n in org.djutils.traceverifier.TraceVerifier.sample(String, String) BAD_PRACTICE VA_FORMAT_STRING_USES_NEWLINE 84 Medium