mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[build] Upgrade to PMD 7.2.0 (#6718)
This commit is contained in:
@@ -942,14 +942,7 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof NetworkTableEntry)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return m_handle == ((NetworkTableEntry) other).m_handle;
|
||||
return other == this || other instanceof NetworkTableEntry entry && m_handle == entry.m_handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,6 @@ import us.hebi.quickbuf.ProtoMessage;
|
||||
* kept to the NetworkTableInstance returned by this function to keep it from being garbage
|
||||
* collected.
|
||||
*/
|
||||
@SuppressWarnings("PMD.CouplingBetweenObjects")
|
||||
public final class NetworkTableInstance implements AutoCloseable {
|
||||
/** Client/server mode flag values (as returned by {@link #getNetworkMode()}). */
|
||||
public enum NetworkMode {
|
||||
@@ -773,7 +772,10 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
private static class ListenerStorage implements AutoCloseable {
|
||||
private final ReentrantLock m_lock = new ReentrantLock();
|
||||
private final Map<Integer, Consumer<NetworkTableEvent>> m_listeners = new HashMap<>();
|
||||
|
||||
@SuppressWarnings("PMD.SingularField")
|
||||
private Thread m_thread;
|
||||
|
||||
private int m_poller;
|
||||
private boolean m_waitQueue;
|
||||
private final Event m_waitQueueEvent = new Event();
|
||||
@@ -1519,10 +1521,7 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) {
|
||||
return true;
|
||||
}
|
||||
return other instanceof NetworkTableInstance inst && m_handle == inst.m_handle;
|
||||
return other == this || other instanceof NetworkTableInstance inst && m_handle == inst.m_handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -646,12 +646,10 @@ public final class NetworkTableValue {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) {
|
||||
return true;
|
||||
}
|
||||
return other instanceof NetworkTableValue ntOther
|
||||
&& m_type == ntOther.m_type
|
||||
&& m_value.equals(ntOther.m_value);
|
||||
return other == this
|
||||
|| other instanceof NetworkTableValue ntOther
|
||||
&& m_type == ntOther.m_type
|
||||
&& m_value.equals(ntOther.m_value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user