mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8263358: Update java.lang to use instanceof pattern variable
Reviewed-by: iris, chegar, mchung, dfuchs
This commit is contained in:
parent
ae9af57bf6
commit
329697b02e
18 changed files with 63 additions and 112 deletions
|
@ -519,14 +519,9 @@ final class ProcessHandleImpl implements ProcessHandle {
|
|||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof ProcessHandleImpl) {
|
||||
ProcessHandleImpl other = (ProcessHandleImpl) obj;
|
||||
return (pid == other.pid) &&
|
||||
(startTime == other.startTime
|
||||
|| startTime == 0
|
||||
|| other.startTime == 0);
|
||||
}
|
||||
return false;
|
||||
return (obj instanceof ProcessHandleImpl other)
|
||||
&& (pid == other.pid)
|
||||
&& (startTime == other.startTime || startTime == 0 || other.startTime == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue