Apache Commons logo Apache Commons Codec

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
114 34 0 0

Files

Class Bugs
org.apache.commons.codec.binary.Base32 3
org.apache.commons.codec.binary.Base64 3
org.apache.commons.codec.binary.BaseNCodec 1
org.apache.commons.codec.binary.BaseNCodec$AbstractBuilder 1
org.apache.commons.codec.cli.Digest 1
org.apache.commons.codec.digest.Blake3 1
org.apache.commons.codec.digest.DigestUtils 1
org.apache.commons.codec.digest.MurmurHash2 3
org.apache.commons.codec.digest.MurmurHash3 6
org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32 2
org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32x86 2
org.apache.commons.codec.digest.PureJavaCrc32C 1
org.apache.commons.codec.language.DoubleMetaphone$DoubleMetaphoneResult 1
org.apache.commons.codec.language.bm.Languages 1
org.apache.commons.codec.language.bm.PhoneticEngine 2
org.apache.commons.codec.language.bm.Rule$Phoneme 1
org.apache.commons.codec.language.bm.Rule$PhonemeList 2
org.apache.commons.codec.net.PercentCodec 2

org.apache.commons.codec.binary.Base32

Bug Category Details Line Priority
Exception thrown in class org.apache.commons.codec.binary.Base32 at new org.apache.commons.codec.binary.Base32(int, byte[], boolean, byte, CodecPolicy) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 336 Medium
Exception thrown in class org.apache.commons.codec.binary.Base32 at new org.apache.commons.codec.binary.Base32(int, byte[], byte[], byte, CodecPolicy) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 363 Medium
Switch statement found in org.apache.commons.codec.binary.Base32.decode(byte[], int, int, BaseNCodec$Context) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 449-451 Medium

org.apache.commons.codec.binary.Base64

Bug Category Details Line Priority
Exception thrown in class org.apache.commons.codec.binary.Base64 at new org.apache.commons.codec.binary.Base64(int, byte[], byte, byte[], CodecPolicy) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 670 Medium
Exception thrown in class org.apache.commons.codec.binary.Base64 at new org.apache.commons.codec.binary.Base64(int, byte[], boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 611 Medium
Exception thrown in class org.apache.commons.codec.binary.Base64 at new org.apache.commons.codec.binary.Base64(int, byte[], boolean, CodecPolicy) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 643 Medium

org.apache.commons.codec.binary.BaseNCodec

Bug Category Details Line Priority
Unread field: org.apache.commons.codec.binary.BaseNCodec.PAD; should this field be static? PERFORMANCE SS_SHOULD_BE_STATIC 391 Medium

org.apache.commons.codec.binary.BaseNCodec$AbstractBuilder

Bug Category Details Line Priority
org.apache.commons.codec.binary.BaseNCodec$AbstractBuilder.setEncodeTable(byte[]) may expose internal representation by storing an externally mutable object into BaseNCodec$AbstractBuilder.encodeTable MALICIOUS_CODE EI_EXPOSE_REP2 131 Medium

org.apache.commons.codec.cli.Digest

Bug Category Details Line Priority
Exception thrown in class org.apache.commons.codec.cli.Digest at new org.apache.commons.codec.cli.Digest(String[]) 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

org.apache.commons.codec.digest.Blake3

Bug Category Details Line Priority
Unsigned right shift cast to short/byte in org.apache.commons.codec.digest.Blake3.packInt(int, byte[], int, int) STYLE ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT 407 Medium

org.apache.commons.codec.digest.DigestUtils

Bug Category Details Line Priority
Exception thrown in class org.apache.commons.codec.digest.DigestUtils at new org.apache.commons.codec.digest.DigestUtils(String) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 1407 Medium

org.apache.commons.codec.digest.MurmurHash2

Bug Category Details Line Priority
Switch statement found in org.apache.commons.codec.digest.MurmurHash2.hash32(byte[], int, int) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 141-143 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash2.hash32(byte[], int, int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 139-146 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash2.hash64(byte[], int, int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 247-262 Medium

org.apache.commons.codec.digest.MurmurHash3

Bug Category Details Line Priority
Switch statement found in org.apache.commons.codec.digest.MurmurHash3.hash32(byte[], int, int, int) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 732-734 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3.hash32x86(byte[], int, int, int) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 929-931 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3.hash128x64Internal(byte[], int, int, long) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 563-602 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3.hash32(byte[], int, int, int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 730-742 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3.hash32x86(byte[], int, int, int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 927-939 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3.hash64(byte[], int, int, int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 1063-1081 Medium

org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32

Bug Category Details Line Priority
Switch statement found in org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32.finalise(int, int, byte[], int) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 102-104 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32.finalise(int, int, byte[], int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 100-112 Medium

org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32x86

Bug Category Details Line Priority
Switch statement found in org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32x86.finalise(int, int, byte[], int) where one case falls through to the next case STYLE SF_SWITCH_FALLTHROUGH 276-278 Medium
Switch statement found in org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32x86.finalise(int, int, byte[], int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 274-286 Medium

org.apache.commons.codec.digest.PureJavaCrc32C

Bug Category Details Line Priority
Switch statement found in org.apache.commons.codec.digest.PureJavaCrc32C.update(byte[], int, int) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 621-635 Medium

org.apache.commons.codec.language.DoubleMetaphone$DoubleMetaphoneResult

Bug Category Details Line Priority
new org.apache.commons.codec.language.DoubleMetaphone$DoubleMetaphoneResult(DoubleMetaphone, int) may expose internal representation by storing an externally mutable object into DoubleMetaphone$DoubleMetaphoneResult.this$0 MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium

org.apache.commons.codec.language.bm.Languages

Bug Category Details Line Priority
org.apache.commons.codec.language.bm.Languages.getLanguages() may expose internal representation by returning Languages.languages MALICIOUS_CODE EI_EXPOSE_REP 351 Medium

org.apache.commons.codec.language.bm.PhoneticEngine

Bug Category Details Line Priority
Exception thrown in class org.apache.commons.codec.language.bm.PhoneticEngine at new org.apache.commons.codec.language.bm.PhoneticEngine(NameType, RuleType, boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 276 Medium
Exception thrown in class org.apache.commons.codec.language.bm.PhoneticEngine at new org.apache.commons.codec.language.bm.PhoneticEngine(NameType, RuleType, boolean, int) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 294 Medium

org.apache.commons.codec.language.bm.Rule$Phoneme

Bug Category Details Line Priority
org.apache.commons.codec.language.bm.Rule$Phoneme.getPhonemeText() may expose internal representation by returning Rule$Phoneme.phonemeText MALICIOUS_CODE EI_EXPOSE_REP 184 Medium

org.apache.commons.codec.language.bm.Rule$PhonemeList

Bug Category Details Line Priority
org.apache.commons.codec.language.bm.Rule$PhonemeList.getPhonemes() may expose internal representation by returning Rule$PhonemeList.phonemeList MALICIOUS_CODE EI_EXPOSE_REP 264 Medium
new org.apache.commons.codec.language.bm.Rule$PhonemeList(List) may expose internal representation by storing an externally mutable object into Rule$PhonemeList.phonemeList MALICIOUS_CODE EI_EXPOSE_REP2 259 Medium

org.apache.commons.codec.net.PercentCodec

Bug Category Details Line Priority
Exception thrown in class org.apache.commons.codec.net.PercentCodec at new org.apache.commons.codec.net.PercentCodec() will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 69 Medium
Exception thrown in class org.apache.commons.codec.net.PercentCodec at new org.apache.commons.codec.net.PercentCodec(byte[], boolean) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks. BAD_PRACTICE CT_CONSTRUCTOR_THROW 82 Medium