NullPointerException in JDK compiler 17 - Cannot read field "bindingsWhenTrue" because "currentBindings" is null
Victor Williams Stafusa da Silva
victorwssilva at gmail.com
Wed Sep 15 18:42:45 UTC 2021
Hi. I tried to run some of my projects in JDK 17 and the compiler crashed
with a NPE. It used to work just fine in JDK 16.
After trying to find out the source of the problem. I got it to
Lombok's @Builder and @Singular. I know that since Lombok hacks into
compiler's inner guts and there are no guarantees of retrocompatibility
there, it is likely that it should be fixed on Lombok's side. However,
there is a chance that it is not that simple and maybe I am facing a real
compiler bug. Also, it is always good to keep an eye there to avoid having
problems around very unusual edge cases flying under the radar.
Here is the link to Lombok's issue that I just created, including all the
NPE's stacktrace produced by JDK 17:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the compiler-dev