diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f0ff46d..fa58687 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -95,6 +95,9 @@ The type attribute can be add,update,fix,remove. Fix SpotBugs [ERROR] High: Found reliance on default encoding in org.apache.commons.logging.LogFactory.initDiagnostics(): new java.io.PrintStream(OutputStream) [org.apache.commons.logging.LogFactory] At LogFactory.java:[line 1205] DM_DEFAULT_ENCODING. + + Fix SpotBugs [ERROR] Medium: Class org.apache.commons.logging.impl.WeakHashtable defines non-transient non-serializable instance field queue [org.apache.commons.logging.impl.WeakHashtable] In WeakHashtable.java SE_BAD_FIELD. + Bump Java from 6 to 8. diff --git a/src/main/java/org/apache/commons/logging/impl/WeakHashtable.java b/src/main/java/org/apache/commons/logging/impl/WeakHashtable.java index bb053ac..067d6e2 100644 --- a/src/main/java/org/apache/commons/logging/impl/WeakHashtable.java +++ b/src/main/java/org/apache/commons/logging/impl/WeakHashtable.java @@ -265,7 +265,7 @@ public final class WeakHashtable extends Hashtable { private static final int PARTIAL_PURGE_COUNT = 10; /** ReferenceQueue we check for GC'd keys. */ - private final ReferenceQueue queue = new ReferenceQueue(); + private final transient ReferenceQueue queue = new ReferenceQueue(); /** Counter used to control how often we purge gc'd entries. */ private int changeCount;