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 |
125 |
63 |
0 |
0 |
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, Serializable) 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 |
Exception thrown in class org.djutils.event.Event at new org.djutils.event.Event(EventType, Serializable, boolean) 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 |
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.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 |
94 |
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 |
57 |
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 |
83 |
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 |
47 |
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, Serializable, Comparable) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. |
BAD_PRACTICE |
CT_CONSTRUCTOR_THROW |
39 |
Medium |
Exception thrown in class org.djutils.event.TimedEvent at new org.djutils.event.TimedEvent(EventType, Serializable, 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 |
52 |
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 |
60 |
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 |
61 |
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 |
44 |
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 |
45 |
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 |
61 |
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 |
62 |
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 |
60 |
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 |
61 |
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 |
61 |
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 |
62 |
Medium |
org.djutils.event.reference.StrongReference
org.djutils.event.reference.WeakReference
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 |
89 |
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 |
34 |
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 |
41 |
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 |
46 |
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 |
40 |
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 |
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.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 |
48 |
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 |
39 |
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.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 |
org.djutils.polynomialroots.PolynomialRoots2
Bug |
Category |
Details |
Line |
Priority |
Test for floating point equality in org.djutils.polynomialroots.PolynomialRoots2.rootBisection(double[], double, double, double) |
STYLE |
FE_FLOATING_POINT_EQUALITY |
704 |
High |
Test for floating point equality in org.djutils.polynomialroots.PolynomialRoots2.rootNewtonRaphson(double[], double) |
STYLE |
FE_FLOATING_POINT_EQUALITY |
667 |
High |
Test for floating point equality in org.djutils.polynomialroots.PolynomialRoots2.rootsAberthEhrlich(Complex[]) |
STYLE |
FE_FLOATING_POINT_EQUALITY |
632 |
Medium |
Test for floating point equality in org.djutils.polynomialroots.PolynomialRoots2.rootsDurandKerner(Complex[]) |
STYLE |
FE_FLOATING_POINT_EQUALITY |
563 |
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 |
50 |
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 |
264-590 |
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 |
51 |
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 |