commit | 393c642f70a2b0dab0562254b320e71eb1e6bc63 | [log] [tgz] |
---|---|---|
author | Nikita Iashchenko <nikitai@google.com> | Wed Oct 05 17:41:54 2022 +0100 |
committer | Victor Chang <vichang@google.com> | Tue Mar 14 11:43:59 2023 +0000 |
tree | ad566564d257df9e35fedf032073065c863088aa | |
parent | fbbda52ce8df1366e12881916bba336b83a5ae3e [diff] |
Import pattern matching changes for java.util.BitSet Bug: 248243024 Test: treehugger Change-Id: I4e2265a5443e5d4ad83e6904ab4a43cf698f2fac
diff --git a/ojluni/src/main/java/java/util/BitSet.java b/ojluni/src/main/java/java/util/BitSet.java index c72970d..0e676ac 100644 --- a/ojluni/src/main/java/java/util/BitSet.java +++ b/ojluni/src/main/java/java/util/BitSet.java
@@ -1064,13 +1064,11 @@ * @see #size() */ public boolean equals(Object obj) { - if (!(obj instanceof BitSet)) + if (!(obj instanceof BitSet set)) return false; if (this == obj) return true; - BitSet set = (BitSet) obj; - checkInvariants(); set.checkInvariants();