mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Use Java 17 features (#6691)
Uses enhanced instanceof (and simplify equals methods) Uses switch expressions and arrow labels Seal and finalize some Shuffleboard classes Co-authored-by: Sam Carlberg <sam@slfc.dev>
This commit is contained in:
@@ -289,11 +289,10 @@ public class Unit<U extends Unit<U>> {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof Unit)) {
|
||||
return false;
|
||||
}
|
||||
Unit<?> that = (Unit<?>) o;
|
||||
return m_name.equals(that.m_name) && m_symbol.equals(that.m_symbol) && this.equivalent(that);
|
||||
return o instanceof Unit<?> that
|
||||
&& m_name.equals(that.m_name)
|
||||
&& m_symbol.equals(that.m_symbol)
|
||||
&& this.equivalent(that);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user