Explicit Poll Workspace #247
Open
ci.jenkins.io / SpotBugs
failed
Nov 11, 2025
2 new issues
| Total | New | Outstanding | Fixed | Trend |
|---|---|---|---|---|
| 2 | 2 | 0 | 0 | 👎 |
Reference build: Plugins » p4-plugin » master #684
Details
Severity distribution of new issues
| Error | Warning High | Warning Normal | Warning Low |
|---|---|---|---|
| 0 | 2 | 0 | 0 |
Annotations
Check warning on line 65 in src/main/java/org/jenkinsci/plugins/p4/changes/P4PollRef.java
ci-jenkins-io / SpotBugs
HE_EQUALS_USE_HASHCODE
HIGH:
org.jenkinsci.plugins.p4.changes.P4PollRef defines equals and uses Object.hashCode()
Raw output
<p> This class overrides <code>equals(Object)</code>, but does not override <code>hashCode()</code>, and inherits the implementation of <code>hashCode()</code> from <code>java.lang.Object</code> (which returns the identity hash code, an arbitrary value assigned to the object by the VM). Therefore, the class is very likely to violate the invariant that equal objects must have equal hashcodes.</p> <p>If you don't think instances of this class will ever be inserted into a HashMap/HashTable, the recommended <code>hashCode</code> implementation to use is:</p> <pre><code>public int hashCode() { assert false : "hashCode not designed"; return 42; // any arbitrary constant will do } </code></pre>
Check warning on line 337 in src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java
ci-jenkins-io / SpotBugs
HE_USE_OF_UNHASHABLE_CLASS
HIGH:
org.jenkinsci.plugins.p4.changes.P4PollRef doesn't define a hashCode() method but is used in a hashed data structure in org.jenkinsci.plugins.p4.tagging.TagAction.getLastPollChange(Run, TaskListener, String)
Raw output
<p> A class defines an equals(Object) method but not a hashCode() method, and thus doesn't fulfill the requirement that equal objects have equal hashCodes. An instance of this class is used in a hash data structure, making the need to fix this problem of highest importance.
Loading