RFR: 8292914: Drop the counter from lambda class names [v9]
Mandy Chung
mchung at openjdk.org
Fri Feb 24 16:00:12 UTC 2023
On Fri, 24 Feb 2023 14:19:40 GMT, David M. Lloyd <duke at openjdk.org> wrote:
>> The class generated for lambda proxies is now defined as a hidden class. This means that the counter, which was used to ensure a unique class name and avoid clashes, is now redundant. In addition to performing redundant work, this also impacts build reproducibility for native image generators which might already have a strategy to cope with hidden classes but cannot cope with indeterminate definition order for lambda proxy classes.
>>
>> This solves JDK-8292914 by making lambda proxy names always be stable without any configuration needed. This would also replace #10024.
>
> David M. Lloyd has updated the pull request incrementally with one additional commit since the last revision:
>
> Apply formatting suggestions and update copyright notices
src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java line 380:
> 378: final String name;
> 379: if (lookup != null) {
> 380: final String definedName = lookup.lookupClass().getName();
nit: you could drop `final` for these local variables. Otherwise, looks good.
-------------
PR: https://git.openjdk.org/jdk/pull/12579
More information about the core-libs-dev
mailing list