@ -46,6 +46,21 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read
<Bug pattern= "EQ_COMPARETO_USE_OBJECT_EQUALS" />
<Bug pattern= "EQ_COMPARETO_USE_OBJECT_EQUALS" />
</Match>
</Match>
<Match >
<!-- Disable warnings about constructors that throw exceptions.
CT_CONSTRUCTOR_THROW: Be wary of letting constructors throw exceptions -->
<Bug pattern= "CT_CONSTRUCTOR_THROW" />
</Match>
<Match >
<!-- Disable warnings about identifiers that conflict with standard library identifiers.
PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES: Do not reuse public identifiers from JSL as class name
PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_FIELD_NAMES: Do not reuse public identifiers from JSL as field name
PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_METHOD_NAMES: Do not reuse public identifiers from JSL as method name
-->
<Bug pattern= "PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES,PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_FIELD_NAMES,PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_METHOD_NAMES" />
</Match>
<Match >
<Match >
<!-- Spotbugs tends to work a little bit better with Java than with Scala. We suppress
<!-- Spotbugs tends to work a little bit better with Java than with Scala. We suppress
some categories of bug reports when using Scala, since spotbugs generates huge
some categories of bug reports when using Scala, since spotbugs generates huge
@ -70,7 +85,8 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read
NP_ALWAYS_NULL: Null pointer dereference
NP_ALWAYS_NULL: Null pointer dereference
MS_CANNOT_BE_FINAL: Field isn't final and can't be protected from malicious code
MS_CANNOT_BE_FINAL: Field isn't final and can't be protected from malicious code
IC_INIT_CIRCULARITY: Initialization circularity
IC_INIT_CIRCULARITY: Initialization circularity
SE_NO_SUITABLE_CONSTRUCTOR: Class is Serializable but its superclass doesn't define a void constructor -->
SE_NO_SUITABLE_CONSTRUCTOR: Class is Serializable but its superclass doesn't define a void constructor
PA_PUBLIC_MUTABLE_OBJECT_ATTRIBUTE: Mutable object-type field is public -->
<Source name= "~.*\.scala" />
<Source name= "~.*\.scala" />
<Or >
<Or >
<Bug pattern= "NP_LOAD_OF_KNOWN_NULL_VALUE" />
<Bug pattern= "NP_LOAD_OF_KNOWN_NULL_VALUE" />
@ -94,9 +110,16 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read
<Bug pattern= "SE_NO_SUITABLE_CONSTRUCTOR" />
<Bug pattern= "SE_NO_SUITABLE_CONSTRUCTOR" />
<Bug pattern= "DMI_RANDOM_USED_ONLY_ONCE" />
<Bug pattern= "DMI_RANDOM_USED_ONLY_ONCE" />
<Bug pattern= "SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA" />
<Bug pattern= "SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA" />
<Bug pattern= "PA_PUBLIC_MUTABLE_OBJECT_ATTRIBUTE" />
</Or>
</Or>
</Match>
</Match>
<Match >
<!-- disabled due to too many false positives
RV_EXCEPTION_NOT_THROWN: Exception created and dropped rather than thrown -->
<Bug pattern= "RV_EXCEPTION_NOT_THROWN" />
</Match>
<!-- false positive in Java 11, related to https://github.com/spotbugs/spotbugs/issues/756 but more complex -->
<!-- false positive in Java 11, related to https://github.com/spotbugs/spotbugs/issues/756 but more complex -->
<Match >
<Match >
<Class name= "org.apache.kafka.common.compress.KafkaLZ4BlockOutputStream" />
<Class name= "org.apache.kafka.common.compress.KafkaLZ4BlockOutputStream" />
@ -270,6 +293,13 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read
<Package name= "~org\.apache\.kafka\.jmh\..*\.jmh_generated" />
<Package name= "~org\.apache\.kafka\.jmh\..*\.jmh_generated" />
</Match>
</Match>
<Match >
<!-- JMH benchmarks often have fields that are modified by the framework.
SS_SHOULD_BE_STATIC: Unread field: should this field be static? -->
<Package name= "~org\.apache\.kafka\.jmh\..*" />
<Bug pattern= "SS_SHOULD_BE_STATIC" />
</Match>
<Match >
<Match >
<!-- Suppress warnings about generated schema arrays. -->
<!-- Suppress warnings about generated schema arrays. -->
<Or >
<Or >
@ -367,6 +397,16 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read
</Or>
</Or>
</Match>
</Match>
<Match >
<!-- Public mutable fields are intentional in some Streams classes.
PA_PUBLIC_PRIMITIVE_ATTRIBUTE: Primitive field is public -->
<Or >
<Class name= "org.apache.kafka.streams.kstream.Materialized" />
<Class name= "org.apache.kafka.streams.state.internals.LeftOrRightValueDeserializer" />
</Or>
<Bug pattern= "PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
</Match>
<Match >
<Match >
<!-- Suppress a spurious warning about locks not being released on all paths.
<!-- Suppress a spurious warning about locks not being released on all paths.
This happens because there is an 'if' statement that checks if we have the lock before
This happens because there is an 'if' statement that checks if we have the lock before