Skip to content

Commit 5949f9a

Browse files
committed
8258422: Cleanup unnecessary null comparison before instanceof check in java.base
rename 'oth' -> 'obj'
1 parent fe303a2 commit 5949f9a

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
@@ -95,14 +95,14 @@ public String getName() {
9595
/**
9696
* Compares the equality of two <code>Signal</code> objects.
9797
*
98-
* @param oth the object to compare with.
98+
* @param obj the object to compare with.
9999
* @return whether two <code>Signal</code> objects are equal.
100100
*/
101-
public boolean equals(Object oth) {
102-
if (this == oth) {
101+
public boolean equals(Object obj) {
102+
if (this == obj) {
103103
return true;
104104
}
105-
if (oth instanceof Signal other) {
105+
if (obj instanceof Signal other) {
106106
return name.equals(other.name) && (number == other.number);
107107
}
108108
return false;

0 commit comments

Comments
 (0)