Integrated: 8271627: Use local field access in favor of Class.getClassLoader0

Claes Redestad redestad at openjdk.java.net
Mon Aug 2 22:40:36 UTC 2021


On Mon, 2 Aug 2021 18:27:00 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> Trivial startup hack/cleanup to use the `classLoader` field directly rather than the `getClassLoader0` accessor. 
> 
> Before aa12c8fbf5b020d168cf29412643bf15514b0439 there was no `classLoader` field and `getClassLoader0` was a native method that retrieved the `ClassLoader` by calling into the runtime. However, now that `classLoader` is injected on mirror creation it makes less sense to use the accessor when not necessary.

This pull request has now been integrated.

Changeset: e621cffa
Author:    Claes Redestad <redestad at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/e621cffa4fee0b403a8650519c70e0a6cb76b03c
Stats:     10 lines in 1 file changed: 0 ins; 0 del; 10 mod

8271627: Use local field access in favor of Class.getClassLoader0

Reviewed-by: mchung

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

PR: https://git.openjdk.java.net/jdk/pull/4960


More information about the core-libs-dev mailing list