Bump SpotBugs to the current versions of Maven Plugin and underlying

tool.

- TODO Can any of these be done without breaking binary compatibility?
EI_EXPOSE_REP, EI_EXPOSE_REP2, MS_EXPOSE_REP,
REFLF_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_FIELD.
- Equals and hashcode do not match up.
This commit is contained in:
Gary Gregory 2022-03-21 10:36:56 -04:00
parent 318cc6ec4d
commit a9f9ba4fba
4 changed files with 29 additions and 8 deletions

View File

@ -638,8 +638,8 @@
<checkstyle.version>9.3</checkstyle.version> <checkstyle.version>9.3</checkstyle.version>
<checkstyle.configdir>src/site/resources/checkstyle</checkstyle.configdir> <checkstyle.configdir>src/site/resources/checkstyle</checkstyle.configdir>
<spotbugs.plugin.version>4.5.0.0</spotbugs.plugin.version> <spotbugs.plugin.version>4.5.3.0</spotbugs.plugin.version>
<spotbugs.impl.version>4.2.3</spotbugs.impl.version> <spotbugs.impl.version>4.6.0</spotbugs.impl.version>
<japicmp.skip>false</japicmp.skip> <japicmp.skip>false</japicmp.skip>
<clirr.skip>true</clirr.skip> <clirr.skip>true</clirr.skip>

View File

@ -125,11 +125,11 @@ The <action> type attribute can be add,update,fix,remove.
<action type="add" dev="ggregory" due-to="Gary Gregory">Add FutureTasks.</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add FutureTasks.</action>
<action type="add" dev="ggregory" due-to="Gary Gregory">Add Memoizer(Function) and Memoizer(Function, boolean).</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add Memoizer(Function) and Memoizer(Function, boolean).</action>
<!-- UPDATE --> <!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump spotbugs-maven-plugin from 4.2.0 to 4.5.0.0 #735, #808, #822, #834.</action> <action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump spotbugs-maven-plugin from 4.2.0 to 4.5.3.0 #735, #808, #822, #834.</action>
<action type="update" dev="ggregory" due-to="Dependabot, XenoAmess">Bump actions/cache from v2.1.4 to v2.1.7 #742, #752, #764, #833.</action> <action type="update" dev="ggregory" due-to="Dependabot, XenoAmess">Bump actions/cache from v2.1.4 to v2.1.7 #742, #752, #764, #833.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump actions/setup-java from v1.4.3 to v2.</action> <action type="update" dev="ggregory" due-to="Gary Gregory">Bump actions/setup-java from v1.4.3 to v2.</action>
<action type="update" dev="ggregory" due-to="Dependabot">Bump actions/checkout from 2 to 3 #859.</action> <action type="update" dev="ggregory" due-to="Dependabot">Bump actions/checkout from 2 to 3 #859.</action>
<action type="update" dev="ggregory" due-to="Dependabot">Bump spotbugs from 4.2.2 to 4.2.3 #744.</action> <action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump spotbugs from 4.2.2 to 4.6.0 #744.</action>
<action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump checkstyle from 8.41 to 9.2.1 #739, #768, #787, #811, #824, #843.</action> <action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">Bump checkstyle from 8.41 to 9.2.1 #739, #768, #787, #811, #824, #843.</action>
<action type="update" dev="ggregory" due-to="Dependabot">Bump easymock from 4.2 to 4.3 #746.</action> <action type="update" dev="ggregory" due-to="Dependabot">Bump easymock from 4.2 to 4.3 #746.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Bump commons.jacoco.version 0.8.6 -> 0.8.7.</action> <action type="update" dev="ggregory" due-to="Gary Gregory">Bump commons.jacoco.version 0.8.6 -> 0.8.7.</action>

View File

@ -23,6 +23,22 @@
--> -->
<FindBugsFilter> <FindBugsFilter>
<!-- TODO Can any of these be done without breaking binary compatibility? -->
<Match>
<Class name="~.*" />
<Or>
<Bug pattern="EI_EXPOSE_REP" />
<Bug pattern="EI_EXPOSE_REP2" />
<Bug pattern="MS_EXPOSE_REP" />
</Or>
</Match>
<!-- TODO Can any of these be done without breaking binary compatibility? -->
<Match>
<Class name="org.apache.commons.lang3.reflect.FieldUtils" />
<Bug pattern="REFLF_REFLECTION_MAY_INCREASE_ACCESSIBILITY_OF_FIELD" />
</Match>
<!-- https://github.com/spotbugs/spotbugs/issues/1504 --> <!-- https://github.com/spotbugs/spotbugs/issues/1504 -->
<Match> <Match>
<Class name="org.apache.commons.lang3.ArrayUtils" /> <Class name="org.apache.commons.lang3.ArrayUtils" />

View File

@ -17,6 +17,7 @@
package org.apache.commons.lang3.time; package org.apache.commons.lang3.time;
import java.util.Date; import java.util.Date;
import java.util.Objects;
import java.util.TimeZone; import java.util.TimeZone;
/** /**
@ -59,11 +60,15 @@ class GmtTimeZone extends TimeZone {
} }
@Override @Override
public boolean equals(final Object other) { public boolean equals(Object obj) {
if (!(other instanceof GmtTimeZone)) { if (this == obj) {
return true;
}
if (!(obj instanceof GmtTimeZone)) {
return false; return false;
} }
return zoneId == ((GmtTimeZone) other).zoneId; GmtTimeZone other = (GmtTimeZone) obj;
return offset == other.offset && Objects.equals(zoneId, other.zoneId);
} }
@Override @Override
@ -83,7 +88,7 @@ class GmtTimeZone extends TimeZone {
@Override @Override
public int hashCode() { public int hashCode() {
return offset; return Objects.hash(offset, zoneId);
} }
@Override @Override