RFR: 8271627: Use local field access in favor of Class.getClassLoader0
Claes Redestad
redestad at openjdk.java.net
Mon Aug 2 18:35:50 UTC 2021
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.
-------------
Commit messages:
- Merge branch 'master' into startup_classLoader0
- Avoid getClassLoader0 calls from within Class
- Reuse SecurityConstants.ACCESS_PERMISSION from MethodHandles
Changes: https://git.openjdk.java.net/jdk/pull/4960/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4960&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8271627
Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod
Patch: https://git.openjdk.java.net/jdk/pull/4960.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4960/head:pull/4960
PR: https://git.openjdk.java.net/jdk/pull/4960
More information about the core-libs-dev
mailing list