RFR: 8319436: Proxy.newProxyInstance throws NPE if loader is null and interface not visible from class loader [v2]
Mandy Chung
mchung at openjdk.org
Mon Nov 6 20:22:43 UTC 2023
> This is a regression caused by JDK-8302791. IAE should be thrown when an interface is not visible to the given class loader but NPE is thrown instead when the loader is null. The boot loader has no name and so the fix will print `null` in the exception message. `test/jdk/java/lang/reflect/Proxy/ClassRestrictions.java` is converted to junit and updated to test IAE thrown because proxy interface is not visible to null loader.
Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
Review feedback
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16525/files
- new: https://git.openjdk.org/jdk/pull/16525/files/5fef84a4..4be40b5d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16525&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16525&range=00-01
Stats: 65 lines in 1 file changed: 10 ins; 34 del; 21 mod
Patch: https://git.openjdk.org/jdk/pull/16525.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16525/head:pull/16525
PR: https://git.openjdk.org/jdk/pull/16525
More information about the core-libs-dev
mailing list