SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.9.8

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
97 30 0 0

Files

Class Bugs
org.apache.johnzon.core.AbstractJsonFactory 1
org.apache.johnzon.core.JsonArrayBuilderImpl 1
org.apache.johnzon.core.JsonBuilderFactoryImpl 1
org.apache.johnzon.core.JsonChars 1
org.apache.johnzon.core.JsonGeneratorFactoryImpl 3
org.apache.johnzon.core.JsonGeneratorImpl 4
org.apache.johnzon.core.JsonMergePatchImpl 1
org.apache.johnzon.core.JsonNumberImpl 1
org.apache.johnzon.core.JsonObjectBuilderImpl 1
org.apache.johnzon.core.JsonObjectImpl 2
org.apache.johnzon.core.JsonParserFactoryImpl 1
org.apache.johnzon.core.JsonPointerImpl 1
org.apache.johnzon.core.JsonProviderImpl 4
org.apache.johnzon.core.JsonReaderImpl 1
org.apache.johnzon.core.JsonStreamParserImpl 4
org.apache.johnzon.core.JsonStringImpl 1
org.apache.johnzon.core.RejectDuplicateKeysMode 1
org.apache.johnzon.core.Snippet$Buffer$SnippetWriter 1

org.apache.johnzon.core.AbstractJsonFactory

Bug Category Details Line Priority
new org.apache.johnzon.core.AbstractJsonFactory(Map, Collection, Collection) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 45 Medium

org.apache.johnzon.core.JsonArrayBuilderImpl

Bug Category Details Line Priority
Exception thrown in class org.apache.johnzon.core.JsonArrayBuilderImpl at new org.apache.johnzon.core.JsonArrayBuilderImpl(Collection, BufferStrategy$BufferProvider, RejectDuplicateKeysMode, JsonProviderImpl) 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

org.apache.johnzon.core.JsonBuilderFactoryImpl

Bug Category Details Line Priority
new org.apache.johnzon.core.JsonBuilderFactoryImpl(Map, BufferStrategy$BufferProvider, RejectDuplicateKeysMode, JsonProviderImpl) makes inefficient use of keySet iterator instead of entrySet iterator PERFORMANCE WMI_WRONG_MAP_ITERATOR 56 Medium

org.apache.johnzon.core.JsonChars

Bug Category Details Line Priority
org.apache.johnzon.core.JsonChars.EVT_MAP should be moved out of an interface and made package protected MALICIOUS_CODE MS_OOI_PKGPROTECT 80 Medium

org.apache.johnzon.core.JsonGeneratorFactoryImpl

Bug Category Details Line Priority
Exception thrown in class org.apache.johnzon.core.JsonGeneratorFactoryImpl at new org.apache.johnzon.core.JsonGeneratorFactoryImpl(Map) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 66 Medium
Class org.apache.johnzon.core.JsonGeneratorFactoryImpl defines non-transient non-serializable instance field buffer BAD_PRACTICE SE_BAD_FIELD Medium
Class org.apache.johnzon.core.JsonGeneratorFactoryImpl defines non-transient non-serializable instance field customBuffer BAD_PRACTICE SE_BAD_FIELD Medium

org.apache.johnzon.core.JsonGeneratorImpl

Bug Category Details Line Priority
Load of known null value in org.apache.johnzon.core.JsonGeneratorImpl.close() STYLE NP_LOAD_OF_KNOWN_NULL_VALUE 457 Medium
org.apache.johnzon.core.JsonGeneratorImpl is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 43 Medium
Useless condition: it's known that c < 128 at this point STYLE UC_USELESS_CONDITION 540 High
Useless condition: it's known that c < 8192 (0x2000) at this point STYLE UC_USELESS_CONDITION 540 High

org.apache.johnzon.core.JsonMergePatchImpl

Bug Category Details Line Priority
new org.apache.johnzon.core.JsonMergePatchImpl(JsonValue, BufferStrategy$BufferProvider, JsonProviderImpl) may expose internal representation by storing an externally mutable object into JsonMergePatchImpl.provider MALICIOUS_CODE EI_EXPOSE_REP2 40 Medium

org.apache.johnzon.core.JsonNumberImpl

Bug Category Details Line Priority
org.apache.johnzon.core.JsonNumberImpl is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 29 Medium

org.apache.johnzon.core.JsonObjectBuilderImpl

Bug Category Details Line Priority
Exception thrown in class org.apache.johnzon.core.JsonObjectBuilderImpl at new org.apache.johnzon.core.JsonObjectBuilderImpl(Map, BufferStrategy$BufferProvider, RejectDuplicateKeysMode, JsonProviderImpl) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 67 Medium

org.apache.johnzon.core.JsonObjectImpl

Bug Category Details Line Priority
org.apache.johnzon.core.JsonObjectImpl.equals(Object) is unusual STYLE EQ_UNUSUAL 160 Medium
org.apache.johnzon.core.JsonObjectImpl is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 35 Medium

org.apache.johnzon.core.JsonParserFactoryImpl

Bug Category Details Line Priority
Exception thrown in class org.apache.johnzon.core.JsonParserFactoryImpl at new org.apache.johnzon.core.JsonParserFactoryImpl(Map, JsonProviderImpl) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 64 Medium

org.apache.johnzon.core.JsonPointerImpl

Bug Category Details Line Priority
Exception thrown in class org.apache.johnzon.core.JsonPointerImpl at new org.apache.johnzon.core.JsonPointerImpl(JsonProvider, 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

org.apache.johnzon.core.JsonProviderImpl

Bug Category Details Line Priority
Class org.apache.johnzon.core.JsonProviderImpl defines non-transient non-serializable instance field bufferProvider BAD_PRACTICE SE_BAD_FIELD High
Class org.apache.johnzon.core.JsonProviderImpl defines non-transient non-serializable instance field builderFactory BAD_PRACTICE SE_BAD_FIELD High
org.apache.johnzon.core.JsonProviderImpl$Cached stored into non-transient field JsonProviderImpl.bufferProvider BAD_PRACTICE SE_BAD_FIELD_STORE 56 High
org.apache.johnzon.core.JsonProviderImpl$Cached stored into non-transient field JsonProviderImpl.builderFactory BAD_PRACTICE SE_BAD_FIELD_STORE 64 High

org.apache.johnzon.core.JsonReaderImpl

Bug Category Details Line Priority
new org.apache.johnzon.core.JsonReaderImpl(JsonParser, boolean, BufferStrategy$BufferProvider, RejectDuplicateKeysMode, JsonProviderImpl) may expose internal representation by storing an externally mutable object into JsonReaderImpl.provider MALICIOUS_CODE EI_EXPOSE_REP2 60 Medium

org.apache.johnzon.core.JsonStreamParserImpl

Bug Category Details Line Priority
Exception thrown in class org.apache.johnzon.core.JsonStreamParserImpl at new org.apache.johnzon.core.JsonStreamParserImpl(InputStream, int, BufferStrategy$BufferProvider, BufferStrategy$BufferProvider, boolean, JsonProviderImpl) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 137 Medium
Exception thrown in class org.apache.johnzon.core.JsonStreamParserImpl at new org.apache.johnzon.core.JsonStreamParserImpl(InputStream, Reader, Charset, int, BufferStrategy$BufferProvider, BufferStrategy$BufferProvider, boolean, JsonProviderImpl) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 167 Medium
Exception thrown in class org.apache.johnzon.core.JsonStreamParserImpl at new org.apache.johnzon.core.JsonStreamParserImpl(InputStream, Charset, int, BufferStrategy$BufferProvider, BufferStrategy$BufferProvider, boolean, JsonProviderImpl) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 145 Medium
Exception thrown in class org.apache.johnzon.core.JsonStreamParserImpl at new org.apache.johnzon.core.JsonStreamParserImpl(Reader, int, BufferStrategy$BufferProvider, BufferStrategy$BufferProvider, boolean, JsonProviderImpl) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 151 Medium

org.apache.johnzon.core.JsonStringImpl

Bug Category Details Line Priority
org.apache.johnzon.core.JsonStringImpl is Serializable; consider declaring a serialVersionUID BAD_PRACTICE SE_NO_SERIALVERSIONID 27 Medium

org.apache.johnzon.core.RejectDuplicateKeysMode

Bug Category Details Line Priority
org.apache.johnzon.core.RejectDuplicateKeysMode.put() may expose internal representation by returning RejectDuplicateKeysMode.put MALICIOUS_CODE EI_EXPOSE_REP 70 Medium

org.apache.johnzon.core.Snippet$Buffer$SnippetWriter

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.johnzon.core.Snippet$Buffer$SnippetWriter.get(): java.io.ByteArrayOutputStream.toString() I18N DM_DEFAULT_ENCODING 314 High