mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8330815: Use pattern matching for instanceof in KeepAliveCache
Reviewed-by: jpai, djelinski
This commit is contained in:
parent
d43654e573
commit
e818ab60a0
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -389,9 +389,9 @@ class KeepAliveKey {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if ((obj instanceof KeepAliveKey) == false)
|
||||
if (!(obj instanceof KeepAliveKey kae))
|
||||
return false;
|
||||
KeepAliveKey kae = (KeepAliveKey)obj;
|
||||
|
||||
return host.equals(kae.host)
|
||||
&& (port == kae.port)
|
||||
&& protocol.equals(kae.protocol)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue