RFR: 8330467: NoClassDefFoundError when lambda is in a hidden class [v2]

Adam Sotona asotona at openjdk.org
Wed Apr 17 16:08:32 UTC 2024


On Wed, 17 Apr 2024 15:39:11 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   applied suggested changes
>
> test/jdk/java/lang/invoke/defineHiddenClass/src/Lambda.java line 28:
> 
>> 26: public class Lambda implements HiddenTest {
>> 27:      public void test() {
>> 28:          Function<Object, String> f = o -> o.toString();
> 
> Recommend you retain the existing method reference e.g.:
> 
>          Function<Object, String> fmref = Object::toString;
>          Function<Object, String> flexp = o -> o.toString();
>          String s = fmref.apply(this) + flexp.apply(this);
>          ...
> 
> Or split them out into two tests (easier to debug if case fails).

I've split the tests, thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18810#discussion_r1569099751


More information about the core-libs-dev mailing list