On Mon, 10 Feb 2025 10:09:59 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Because the field is final, it has to be initialized in the constructor in >> Java code. My initial patch for modifiers chose to initialize to zero but >> that's not quite correct. The constructor cannot be called nor can it be >> made accessible with setAccessible(). So the constructor for >> java.lang.Class is essentially the Hotspot code >> JavaClasses::create_mirror(). This is where the PD is assigned. > > Okay so this pattern of assigning the final fields in the constructor that is > never called is just for appeasing the javac compiler. Yes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23396#discussion_r1948979011