RFR: JDK-8236692: static final fields without initializer are accepted by javac
Vicente Romero
vicente.romero at oracle.com
Tue Jan 7 20:18:39 UTC 2020
Please review the fix for [1] at [2], javac was failing to issue an
error for code like:
record R() {
public static final int X;
}
even though `X` was not initialized as the automatic code to generate
initializer expressions only apply to the fields generated from the
record component. The patch updates the code in Flow that analyzes
compact constructors to don't bail out if the variable being analyzed is
static.
Thanks,
Vicente
[1] https://bugs.openjdk.java.net/browse/JDK-8236692
[2] http://cr.openjdk.java.net/~vromero/8236692/webrev.00/
More information about the compiler-dev
mailing list