1
0

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
This commit is contained in:
Gary Gregory
2023-11-25 11:59:17 -05:00
parent 0f25dd6c0e
commit eb9e4c506f
2 changed files with 4 additions and 1 deletions

View File

@@ -95,6 +95,9 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">
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.
</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">
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.
</action>
<!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Gary Gregory">
Bump Java from 6 to 8.

View File

@@ -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;