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

Files

Class Bugs
org.djutils.base.MutableDouble 1
org.djutils.base.MutableFloat 1
org.djutils.base.NumberParser 4
org.djutils.decoderdumper.Dumper 1
org.djutils.event.Event 2
org.djutils.event.EventListener 1
org.djutils.event.EventProducer 1
org.djutils.event.EventType 3
org.djutils.event.LocalEventProducer 1
org.djutils.event.TimedEvent 2
org.djutils.event.collection.EventProducingCollection 2
org.djutils.event.collection.EventProducingIterator 2
org.djutils.event.collection.EventProducingList 2
org.djutils.event.collection.EventProducingMap 2
org.djutils.event.collection.EventProducingSet 2
org.djutils.event.rmi.RmiEventProducer 1
org.djutils.immutablecollections.ImmutableAbstractCollection 1
org.djutils.immutablecollections.ImmutableAbstractList 1
org.djutils.immutablecollections.ImmutableAbstractMap 1
org.djutils.immutablecollections.ImmutableAbstractSet 1
org.djutils.immutablecollections.ImmutableIterator 1
org.djutils.immutablecollections.ImmutableMap$ImmutableEntry 1
org.djutils.io.CompressedFileWriter 4
org.djutils.logger.CategoryLogger 2
org.djutils.logger.CategoryLogger$DelegateLogger 3
org.djutils.metadata.MetaData 1
org.djutils.metadata.ObjectDescriptor 1
org.djutils.multikeymap.MultiKeyMap 1
org.djutils.quadtree.QuadTree 1
org.djutils.quadtree.Rectangle 1
org.djutils.rmi.RmiObject 2
org.djutils.traceverifier.TraceVerifier 6

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 115 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 115 High

org.djutils.base.NumberParser

Bug Category Details Line Priority
Exception thrown in class org.djutils.base.NumberParser at new org.djutils.base.NumberParser() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 112 Medium
Exception thrown in class org.djutils.base.NumberParser at new org.djutils.base.NumberParser(boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 104 Medium
Exception thrown in class org.djutils.base.NumberParser at new org.djutils.base.NumberParser(boolean, boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 94 Medium
Exception thrown in class org.djutils.base.NumberParser at new org.djutils.base.NumberParser(boolean, boolean, Locale) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 78 Medium

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 69 Medium

org.djutils.event.Event

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.Event at new org.djutils.event.Event(EventType, Object) 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.djutils.event.Event at new org.djutils.event.Event(EventType, Object, boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 47 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 172 Medium

org.djutils.event.EventType

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.EventType at new org.djutils.event.EventType(String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 90 Medium
Exception thrown in class org.djutils.event.EventType at new org.djutils.event.EventType(String, MetaData) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 53 Medium
Exception thrown in class org.djutils.event.EventType at new org.djutils.event.EventType(MetaData) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 79 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 36 Medium

org.djutils.event.TimedEvent

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.TimedEvent at new org.djutils.event.TimedEvent(EventType, Object, Comparable) 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
Exception thrown in class org.djutils.event.TimedEvent at new org.djutils.event.TimedEvent(EventType, Object, Comparable, boolean) 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

org.djutils.event.collection.EventProducingCollection

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.collection.EventProducingCollection at new org.djutils.event.collection.EventProducingCollection(Collection) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 56 Medium
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 57 Medium

org.djutils.event.collection.EventProducingIterator

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.collection.EventProducingIterator at new org.djutils.event.collection.EventProducingIterator(Iterator) 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
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 41 Medium

org.djutils.event.collection.EventProducingList

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.collection.EventProducingList at new org.djutils.event.collection.EventProducingList(List) 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
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 58 Medium

org.djutils.event.collection.EventProducingMap

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.collection.EventProducingMap at new org.djutils.event.collection.EventProducingMap(Map) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 56 Medium
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 57 Medium

org.djutils.event.collection.EventProducingSet

Bug Category Details Line Priority
Exception thrown in class org.djutils.event.collection.EventProducingSet at new org.djutils.event.collection.EventProducingSet(Set) 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
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 58 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 177 Medium

org.djutils.immutablecollections.ImmutableAbstractCollection

Bug Category Details Line Priority
Exception thrown in class org.djutils.immutablecollections.ImmutableAbstractCollection at new org.djutils.immutablecollections.ImmutableAbstractCollection(Immutable) 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

org.djutils.immutablecollections.ImmutableAbstractList

Bug Category Details Line Priority
Exception thrown in class org.djutils.immutablecollections.ImmutableAbstractList at new org.djutils.immutablecollections.ImmutableAbstractList(List, Immutable) 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.djutils.immutablecollections.ImmutableAbstractMap

Bug Category Details Line Priority
Exception thrown in class org.djutils.immutablecollections.ImmutableAbstractMap at new org.djutils.immutablecollections.ImmutableAbstractMap(Map, Immutable) 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

org.djutils.immutablecollections.ImmutableAbstractSet

Bug Category Details Line Priority
Exception thrown in class org.djutils.immutablecollections.ImmutableAbstractSet at new org.djutils.immutablecollections.ImmutableAbstractSet(Set, Immutable) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 37 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 430 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 104 High
Found reliance on default encoding in org.djutils.io.CompressedFileWriter.create(String, boolean): new java.io.OutputStreamWriter(OutputStream) I18N DM_DEFAULT_ENCODING 102 High
org.djutils.io.CompressedFileWriter.next(String) may expose internal representation by returning CompressedFileWriter.bufferedWriter MALICIOUS_CODE EI_EXPOSE_REP 73 Medium

org.djutils.logger.CategoryLogger

Bug Category Details Line Priority
Public static org.djutils.logger.CategoryLogger.always() may expose internal representation by returning CategoryLogger.BASE_DELEGATE MALICIOUS_CODE MS_EXPOSE_REP 220 Medium
org.djutils.logger.CategoryLogger.setLogLevelAll(Level) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 356 Medium

org.djutils.logger.CategoryLogger$DelegateLogger

Bug Category Details Line Priority
org.djutils.logger.CategoryLogger$DelegateLogger.when(BooleanSupplier) may expose internal representation by returning CategoryLogger.NO_LOGGER MALICIOUS_CODE EI_EXPOSE_REP 800 Medium
org.djutils.logger.CategoryLogger$DelegateLogger.when(boolean) may expose internal representation by returning CategoryLogger.NO_LOGGER MALICIOUS_CODE EI_EXPOSE_REP 788 Medium
org.djutils.logger.CategoryLogger$DelegateLogger.mdc() makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 842 Medium

org.djutils.metadata.MetaData

Bug Category Details Line Priority
Exception thrown in class org.djutils.metadata.MetaData at new org.djutils.metadata.MetaData(String, String, ObjectDescriptor[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 44 Medium

org.djutils.metadata.ObjectDescriptor

Bug Category Details Line Priority
Exception thrown in class org.djutils.metadata.ObjectDescriptor at new org.djutils.metadata.ObjectDescriptor(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 34 Medium

org.djutils.multikeymap.MultiKeyMap

Bug Category Details Line Priority
Exception thrown in class org.djutils.multikeymap.MultiKeyMap at new org.djutils.multikeymap.MultiKeyMap(Class[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 42 Medium

org.djutils.quadtree.QuadTree

Bug Category Details Line Priority
Exception thrown in class org.djutils.quadtree.QuadTree at new org.djutils.quadtree.QuadTree(int, double, double, 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 46 Medium

org.djutils.quadtree.Rectangle

Bug Category Details Line Priority
Exception thrown in class org.djutils.quadtree.Rectangle at new org.djutils.quadtree.Rectangle(double, double, double, double, boolean) 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.djutils.rmi.RmiObject

Bug Category Details Line Priority
Exception thrown in class org.djutils.rmi.RmiObject at new org.djutils.rmi.RmiObject(String, int, String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 65 Medium
Exception thrown in class org.djutils.rmi.RmiObject at new org.djutils.rmi.RmiObject(URL, 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

org.djutils.traceverifier.TraceVerifier

Bug Category Details Line Priority
Exception thrown in class org.djutils.traceverifier.TraceVerifier at new org.djutils.traceverifier.TraceVerifier(String) 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
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