You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
Here is a screenshot showing where the documentation of @UtilityClass says
All methods, inner classes, and fields in the class are marked static.
Version info
Lombok version: Not sure. IntelliJ bundles Lombok and says version it is using is bundled 213.7172.25.
javac version: 11.0.12
Platform: I am using IntelliJ. Here is the info obtained from IntelliJ IDEA -> About IntelliJ IDEA -> Copy:
IntelliJ IDEA 2021.3.3 (Community Edition)
Build #IC-213.7172.25, built on March 15, 2022
Runtime version: 11.0.14.1+1-b1751.46 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
debugger.watches.in.variables=false
This sounds familiar, as in, already fixed. However, its possible the lombok plugin didn't. It is a separate codebase; the issue should probably be filed on their tracker. It's here.
Describe the bug
The documentation of
@UtilityClass
says it makes all inner classes static, but that doesn't seem to be the case.Steps to Reproduce
Compile this code:
Expected behavior
The code compiles.
Actual behavior
The code does not compile. Instead, I get this compile error:
Workaround
The code compiles after explicitly adding
static
to the inner class as shown in the following code:Additional context
Here is a screenshot showing where the documentation of
@UtilityClass
saysVersion info
bundled 213.7172.25
.javac
version: 11.0.12IntelliJ IDEA -> About IntelliJ IDEA -> Copy
:The text was updated successfully, but these errors were encountered: