Deal with Spotbugs complaints from latest version

This commit is contained in:
Sebb 2023-12-08 23:10:38 +00:00
parent 3ac237e0e2
commit 5fbd1bd909
3 changed files with 22 additions and 2 deletions

View File

@ -42,6 +42,24 @@
<Bug pattern="REFLF_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_FIELD" />
</Match>
<!-- TODO Cannot be done without breaking binary compat. -->
<Match>
<Class name="org.apache.commons.lang3.tuple.MutablePair" />
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
</Match>
<!-- TODO Cannot be done without breaking binary compat. -->
<Match>
<Class name="org.apache.commons.lang3.tuple.MutableTriple" />
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
</Match>
<!-- Class is deprecated; not worth the effort to fix -->
<Match>
<Class name="org.apache.commons.lang3.ThreadUtils$ThreadIdPredicate" />
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
<!-- https://github.com/spotbugs/spotbugs/issues/1504 -->
<Match>
<Class name="org.apache.commons.lang3.ArrayUtils" />

View File

@ -60,7 +60,8 @@ public class SerializationUtils {
* <p>For more in-depth information about the problem for which this
* class here is a workaround, see the JIRA issue LANG-626.</p>
*/
static class ClassLoaderAwareObjectInputStream extends ObjectInputStream {
static final class ClassLoaderAwareObjectInputStream extends ObjectInputStream {
// Note: This is final to avoid Spotbugs CT_CONSTRUCTOR_THROW
private static final Map<String, Class<?>> primitiveTypes =
new HashMap<>();

View File

@ -254,7 +254,8 @@ public class FastDatePrinter implements DatePrinter, Serializable {
/**
* Inner class to output a padded number.
*/
private static class PaddedNumberField implements NumberRule {
private final static class PaddedNumberField implements NumberRule {
// Note: This is final to avoid Spotbugs CT_CONSTRUCTOR_THROW
private final int field;
private final int size;