lombok-intellij-plugin
lombok-intellij-plugin copied to clipboard
Variable 'log' might not have been initialized
Short description
When trying to log from a static block the 'log' variable is marked as not initialized inside IntelliJ
Expected behavior
Variable 'log' should not be marked as not initialized
Version information
- IDEA Version: IntelliJ IDEA 2020.3.3, Build #IU-203.7717.56, built on March 15, 2021
- JDK Version: JDK 11.0.4
- OS Type & Version: Windows 10 Enterprise, version 20H2
- Lombok Plugin Version: Bundled with IntelliJ (203.7717.56)
- Lombok Dependency Version: 1.18.18
Steps to reproduce
Create a class like this in IntelliJ and it will mark 'log' variable as not initialized.
import lombok.extern.slf4j.Slf4j;
@Slf4j public class VariableNotInitialized { static { log.info("Variable 'log' might not have been initialized"); } }
Sample project
n/a
Additional information
n/a
Stacktrace
n/a
Same here; Tracking this then
https://youtrack.jetbrains.com/issue/IDEA-265211