mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8263668: Update java.time to use instanceof pattern variable
Reviewed-by: lancea, ryadav, naoto, rriggs, dfuchs, scolebourne, chegar
This commit is contained in:
parent
a93d911954
commit
28af31db34
34 changed files with 129 additions and 176 deletions
|
@ -628,14 +628,11 @@ public final class HijrahDate
|
|||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof HijrahDate) {
|
||||
HijrahDate otherDate = (HijrahDate) obj;
|
||||
return prolepticYear == otherDate.prolepticYear
|
||||
return (obj instanceof HijrahDate otherDate)
|
||||
&& prolepticYear == otherDate.prolepticYear
|
||||
&& this.monthOfYear == otherDate.monthOfYear
|
||||
&& this.dayOfMonth == otherDate.dayOfMonth
|
||||
&& getChronology().equals(otherDate.getChronology());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue