RFR: 8330815: Use pattern matching for instanceof in KeepAliveCache [v2]

Christoph Langer clanger at openjdk.org
Tue Apr 23 10:49:42 UTC 2024


On Tue, 23 Apr 2024 08:54:17 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> I'd prefer this instead:
> 
> ```
>         if (!(obj instanceof KeepAliveKey kae))
>             return false;
> ```
> 
> because it's more awesome :) but what you propose looks good too.

Yes, you're right. Adapted. 😄

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18885#issuecomment-2071983640


More information about the net-dev mailing list