mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +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
|
@ -992,13 +992,10 @@ public final class Period
|
|||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof Period) {
|
||||
Period other = (Period) obj;
|
||||
return years == other.years &&
|
||||
months == other.months &&
|
||||
days == other.days;
|
||||
}
|
||||
return false;
|
||||
return (obj instanceof Period other)
|
||||
&& years == other.years
|
||||
&& months == other.months
|
||||
&& days == other.days;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue