RFR: 8349145: Make Class.getProtectionDomain() non-native [v4]

David Holmes dholmes at openjdk.org
Thu Feb 6 07:32:12 UTC 2025


On Wed, 5 Feb 2025 17:41:22 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/Class.java line 239:
>> 
>>> 237:      * generated.
>>> 238:      */
>>> 239:     private Class(ClassLoader loader, Class<?> arrayComponentType, ProtectionDomain pd) {
>> 
>> If this constructor is not used then why do we need to add the PD argument, rather than just set it to null? For that matter why do we even need the field if nothing is ever setting it? I'm missing something here.
>
> @DanHeidinga suggested this for my other PR as a convention that's used for the j.l.Class constructor.

I am still missing what can actually set a PD here, sorry. ??

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23396#discussion_r1944230577


More information about the core-libs-dev mailing list