The following document contains the results of SpotBugs
SpotBugs Version is 4.9.8
Threshold is medium
Effort is default
| Classes | Bugs | Errors | Missing Classes |
|---|---|---|---|
| 169 | 30 | 0 | 0 |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception is caught when Exception is not thrown in org.apache.johnzon.mapper.JohnzonCores.<static initializer for JohnzonCores>() | STYLE | REC_CATCH_EXCEPTION | 44 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.apache.johnzon.mapper.MapperBuilder.getAdapters() may expose internal representation by returning MapperBuilder.adapters | MALICIOUS_CODE | EI_EXPOSE_REP | 255 | Medium |
| org.apache.johnzon.mapper.MapperBuilder.setInterfaceImplementationMapping(Map) may expose internal representation by storing an externally mutable object into MapperBuilder.interfaceImplementationMapping | MALICIOUS_CODE | EI_EXPOSE_REP2 | 289 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Class org.apache.johnzon.mapper.MapperConfig implements Cloneable but does not define or use clone method | BAD_PRACTICE | CN_IDIOM | 51 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getAdapters() may expose internal representation by returning MapperConfig.adapters | MALICIOUS_CODE | EI_EXPOSE_REP | 450 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getInterfaceImplementationMapping() may expose internal representation by returning MapperConfig.interfaceImplementationMapping | MALICIOUS_CODE | EI_EXPOSE_REP | 260 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getNoGeneratorAdapterTypes() may expose internal representation by returning MapperConfig.noGeneratorAdapterTypes | MALICIOUS_CODE | EI_EXPOSE_REP | 224 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getNoParserAdapterTypes() may expose internal representation by returning MapperConfig.noParserAdapterTypes | MALICIOUS_CODE | EI_EXPOSE_REP | 220 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getObjectConverterReaders() may expose internal representation by returning MapperConfig.objectConverterReaders | MALICIOUS_CODE | EI_EXPOSE_REP | 462 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getObjectConverterWriters() may expose internal representation by returning MapperConfig.objectConverterWriters | MALICIOUS_CODE | EI_EXPOSE_REP | 458 | Medium |
| org.apache.johnzon.mapper.MapperConfig.getReverseAdapters() may expose internal representation by returning MapperConfig.reverseAdapters | MALICIOUS_CODE | EI_EXPOSE_REP | 454 | Medium |
| new org.apache.johnzon.mapper.MapperConfig(LazyConverterMap, Map, Map, int, boolean, boolean, boolean, boolean, boolean, boolean, AccessMode, Charset, Comparator, boolean, SerializeValueFilter, boolean, Boolean, Map, boolean, boolean, int, boolean, Function, Function, String, Predicate, Predicate, Function, SnippetFactory, Function) may expose internal representation by storing an externally mutable object into MapperConfig.adapters | MALICIOUS_CODE | EI_EXPOSE_REP2 | 192 | Medium |
| new org.apache.johnzon.mapper.MapperConfig(LazyConverterMap, Map, Map, int, boolean, boolean, boolean, boolean, boolean, boolean, AccessMode, Charset, Comparator, boolean, SerializeValueFilter, boolean, Boolean, Map, boolean, boolean, int, boolean, Function, Function, String, Predicate, Predicate, Function, SnippetFactory, Function) may expose internal representation by storing an externally mutable object into MapperConfig.interfaceImplementationMapping | MALICIOUS_CODE | EI_EXPOSE_REP2 | 200 | Medium |
| new org.apache.johnzon.mapper.MapperConfig(LazyConverterMap, Map, Map, int, boolean, boolean, boolean, boolean, boolean, boolean, AccessMode, Charset, Comparator, boolean, SerializeValueFilter, boolean, Boolean, Map, boolean, boolean, int, boolean, Function, Function, String, Predicate, Predicate, Function, SnippetFactory, Function) may expose internal representation by storing an externally mutable object into MapperConfig.objectConverterReaders | MALICIOUS_CODE | EI_EXPOSE_REP2 | 170 | Medium |
| new org.apache.johnzon.mapper.MapperConfig(LazyConverterMap, Map, Map, int, boolean, boolean, boolean, boolean, boolean, boolean, AccessMode, Charset, Comparator, boolean, SerializeValueFilter, boolean, Boolean, Map, boolean, boolean, int, boolean, Function, Function, String, Predicate, Predicate, Function, SnippetFactory, Function) may expose internal representation by storing an externally mutable object into MapperConfig.objectConverterWriters | MALICIOUS_CODE | EI_EXPOSE_REP2 | 169 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Load of known null value in org.apache.johnzon.mapper.MappingGeneratorImpl.writeValue(Class, boolean, boolean, boolean, boolean, boolean, Adapter, String, Object, ObjectConverter$Writer, Collection, JsonPointerTracker, JsonGenerator) | STYLE | NP_LOAD_OF_KNOWN_NULL_VALUE | 483 | Medium |
| Useless condition: it's known that writeBody == true at this point | STYLE | UC_USELESS_CONDITION | 170 | High |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| new org.apache.johnzon.mapper.MappingParserImpl(MapperConfig, Mappings, JsonReader, Map) may expose internal representation by storing an externally mutable object into MappingParserImpl.mappings | MALICIOUS_CODE | EI_EXPOSE_REP2 | 91 | Medium |
| Return value of putIfAbsent is ignored, but method is reused in org.apache.johnzon.mapper.MappingParserImpl.convertTo(Type, String) | MT_CORRECTNESS | RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED | 1178 | High |
| Return value of putIfAbsent is ignored, but adapterKey is reused in org.apache.johnzon.mapper.MappingParserImpl.getAdapterKey(Adapter) | MT_CORRECTNESS | RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED | 618 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.apache.johnzon.mapper.Mappings$MapUnwrapperWriter at new org.apache.johnzon.mapper.Mappings$MapUnwrapperWriter(Map, String[]) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. | BAD_PRACTICE | CT_CONSTRUCTOR_THROW | 840 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.apache.johnzon.mapper.access.BaseAccessMode$ConfiguredFieldFilteringStrategy.getFieldsToRemove() may expose internal representation by returning BaseAccessMode$ConfiguredFieldFilteringStrategy.fieldsToRemove | MALICIOUS_CODE | EI_EXPOSE_REP | 357 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.apache.johnzon.mapper.access.FieldAccessMode$FieldDecoratedType.getField() may expose internal representation by returning FieldAccessMode$FieldDecoratedType.field | MALICIOUS_CODE | EI_EXPOSE_REP | 126 | Medium |
| new org.apache.johnzon.mapper.access.FieldAccessMode$FieldDecoratedType(Field, Type) may expose internal representation by storing an externally mutable object into FieldAccessMode$FieldDecoratedType.field | MALICIOUS_CODE | EI_EXPOSE_REP2 | 108 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Useless condition: it's known that record == false at this point | STYLE | UC_USELESS_CONDITION | 111 | High |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.apache.johnzon.mapper.access.MethodAccessMode$MethodDecoratedType.getMethod() may expose internal representation by returning MethodAccessMode$MethodDecoratedType.method | MALICIOUS_CODE | EI_EXPOSE_REP | 153 | Medium |
| new org.apache.johnzon.mapper.access.MethodAccessMode$MethodDecoratedType(Method, Type) may expose internal representation by storing an externally mutable object into MethodAccessMode$MethodDecoratedType.method | MALICIOUS_CODE | EI_EXPOSE_REP2 | 135 | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| org.apache.johnzon.mapper.map.LazyConverterMap doesn't override java.util.concurrent.ConcurrentHashMap.equals(Object) | STYLE | EQ_DOESNT_OVERRIDE_EQUALS | 1 | Medium |
| Class org.apache.johnzon.mapper.map.LazyConverterMap defines non-transient non-serializable instance field dateTimeFormatter | BAD_PRACTICE | SE_BAD_FIELD | Medium |
| Bug | Category | Details | Line | Priority |
|---|---|---|---|---|
| Exception thrown in class org.apache.johnzon.mapper.reflection.JohnzonParameterizedType at new org.apache.johnzon.mapper.reflection.JohnzonParameterizedType(Type, Type[]) 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 |