Integrated: 8343194: Avoid redundant Hashtable.containsKey call in CodeSource.readObject

Andrey Turbanov aturbanov at openjdk.org
Fri Nov 1 11:49:36 UTC 2024


On Tue, 29 Oct 2024 08:15:58 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

> `Hashtable` doesn't allow `null` values.
> It means we can replace containsKey+get with get+null check.
> It's clearer and a bit faster.

This pull request has now been integrated.

Changeset: f77a5144
Author:    Andrey Turbanov <aturbanov at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f77a5144a12fc31bad8b672a3cc9caa688d78e72
Stats:     6 lines in 1 file changed: 0 ins; 3 del; 3 mod

8343194: Avoid redundant Hashtable.containsKey call in CodeSource.readObject

Reviewed-by: mullan

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

PR: https://git.openjdk.org/jdk/pull/21753


More information about the security-dev mailing list