On Thu, 17 Dec 2020 11:35:26 GMT, Andrey Turbanov
<[email protected]> wrote:
>> src/java.base/share/classes/jdk/internal/misc/Signal.java line 102:
>>
>>> 100: */
>>> 101: public boolean equals(Object other) {
>>> 102: if (this == other) {
>>
>> It might be a bit cleaner to rename Object other to "obj" to avoid having
>> Object other and Signal other1.
>
> Actually, I'm not sure if `oth` is better name for variable than `other1`.
> I would say they have the same rank :)
I believe Alan is suggesting to do:
/**
* Compares the equality of two <code>Signal</code> objects.
*
* @param obj the object to compare with.
* @return whether two <code>Signal</code> objects are equal.
*/
public boolean equals(Object obj) {
if (this == obj) {
this leaves the variable name `other` free for later use inside the method.
-------------
PR: https://git.openjdk.java.net/jdk/pull/20