Skip to content

Commit 314217e

Browse files
authored
8258422: Cleanup unnecessary null comparison before instanceof check in java.base
1 parent f5727ca commit 314217e

File tree

1 file changed

+4
-4
lines changed
  • src/java.base/share/classes/jdk/internal/misc

1 file changed

+4
-4
lines changed

src/java.base/share/classes/jdk/internal/misc/Signal.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ public String getName() {
9898
* @param other the object to compare with.
9999
* @return whether two <code>Signal</code> objects are equal.
100100
*/
101-
public boolean equals(Object other) {
102-
if (this == other) {
101+
public boolean equals(Object oth) {
102+
if (this == oth) {
103103
return true;
104104
}
105-
if (other instanceof Signal other1) {
106-
return name.equals(other1.name) && (number == other1.number);
105+
if (oth instanceof Signal other) {
106+
return name.equals(other.name) && (number == other.number);
107107
}
108108
return false;
109109
}

0 commit comments

Comments
 (0)