On Thu, 19 Nov 2020 02:08:52 GMT, Calvin Cheung <cche...@openjdk.org> wrote:

>> I'm not sure if this is a good idea, TBH. The disableEagerInitialization 
>> setting is for native-image pre-generation purposes and the less CDS cares 
>> about it, the better. I'd prefer it if there's no trace of the property in 
>> hotspot sources.
>
> Hi Claes,
> 
> Thanks for taking a look.
> 
> So should I keep the following `!initialize` check in LambdaProxyClassArchive?
> 109         if (!loadedByBuiltinLoader(caller) || !initialize ||
> 110             !CDS.isSharingEnabled() || isSerializable || 
> markerInterfaces.length > 0 || additionalBridges.length > 0)
> 111             return null;
> If we keep the above code, I think we don't need to pass the `initialize` to 
> `findFromArchive` and eventually to `JVM_LookupLambdaProxyClassFromArchive`.
> 
> Let me know if the above is what you have in mind?
> 
> thanks,
> Calvin

Right, I'd drop that argument - I would go further and suggest making calls to 
both `LambdaProxyClassArchive.register` and `LambdaProxyClassArchive.find` 
conditional on `disableEagerInitialization` being `false` to avoid any 
accidental mix-up and reduce complexity of these orthogonal features/concerns.

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

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

Reply via email to