diff --git a/src/conf/spotbugs-exclude-filter.xml b/src/conf/spotbugs-exclude-filter.xml index 4d609e71e..af42bba2c 100644 --- a/src/conf/spotbugs-exclude-filter.xml +++ b/src/conf/spotbugs-exclude-filter.xml @@ -42,6 +42,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/apache/commons/lang3/SerializationUtils.java b/src/main/java/org/apache/commons/lang3/SerializationUtils.java index 7ab6a1124..acad6f0a1 100644 --- a/src/main/java/org/apache/commons/lang3/SerializationUtils.java +++ b/src/main/java/org/apache/commons/lang3/SerializationUtils.java @@ -60,7 +60,8 @@ public class SerializationUtils { *

For more in-depth information about the problem for which this * class here is a workaround, see the JIRA issue LANG-626.

*/ - 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> primitiveTypes = new HashMap<>(); diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java index 6b8ca94d8..3e78f42d2 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java @@ -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;