Thanks for the feedback!
I've checked all the issues you reported and I was no longer able to
reproduce them on mainline.
As Dan said, maybe wait for the next JDK 28 EA, and give it another try.
Cheers
Maurizio
On 05/08/2026 14:29, Oleg Estekhin wrote:
Hello!
First, thanks for your hard work and congratulations on merging JEP 401
into JDK 28!
We have tried ea2 and ea3 builds in our project and i would like to give
some feedback on how it went.
The project is 1M+ LOC, 500+ Maven modules, with different levels of code
maturity in different parts, but overall in the pretty decent shape because
we not only use JDK 26 at runtime, but, at the moment, run (and pass) all
our tests on JDK 26 and the latest builds of 27ea and 28ea.
What i have tried:
- compiling on 26, running on 27-jep401ea3 - works.
- compiling on 26, running on 27-jep401ea3 **preview** - works.
- compiling on 27-jep401ea3, running on 27-jep401ea3 - works.
- compiling on 27-jep401ea3 **preview**, running under 27-jep401ea3
**preview** - works with `-Xverify:none`.
- replacing EVERY `record` with `value record`, compiling on 27-jep401ea3
**preview**, running under 27-jep401ea3 **preview** - works.
"Works" means, that, after some minor adjustments in the murkier parts of
the code, our project compiles and passes all unit tests, and also runs and
passes all e2e tests.
I am running all this on my dev notebook, so i can't say anything about
changes in performance or memory usage, although i do see the field
flattening happening (via `-XX:+PrintFieldLayout` and `jcmd
GC.class_histogram`).
About these "minor adjustments" - i had encountered some problems/bugs?,
but i had found workarounds for all of them. I have created reproducers at
https://github.com/estekhin/playground-valhalla, with brief explanations
below.
Best regards,
Oleg
### self-referencing constructor (even without preview)
https://github.com/estekhin/playground-valhalla/tree/main/valhalla-ea-self-referencing-constructor-compilation-failure
We had some classes with constructors that pass constructor ref to the
super, like
```java
SelfReferencingByConstructorRef() {
super(SelfReferencingByConstructorRef::new);
}
```
which works under 26/27ea/28ea b9, but fails under 27-jep401ea3 with
`reference to null may only appear after an explicit constructor
invocation`.
The code is questionable in the first place, but at least it is easy to fix
by introducing a static wrapper over the call to constructor.
https://github.com/estekhin/playground-valhalla/tree/main/valhalla-ea-separate-compilation-failure
### separate compilation failure for generic code (even without preview)
https://github.com/estekhin/playground-valhalla/tree/main/valhalla-ea-separate-compilation-failure
The same code with generic class and getter compiles fine when the usage is
in the same module, and fails to compile when the usage is compiled
separately.
### VerifyError for canonical record constructors with ternary (with
preview only)
https://github.com/estekhin/playground-valhalla/tree/main/valhalla-ea-record-verify-error
The following record
```java
public record RecordWithTernaryLast(
int value1,
int value2
) {
public RecordWithTernaryLast(
int value1,
int value2
) {
this.value1 = value1;
this.value2 = value2 > 0 ? 1 : 0;
}
}
```
compiles fine, but fails with `VerifyError: Strict fields not a subset of
initial strict instance fields: value2:I` on load.
This is why i had to use `-Xverify:none` to run in full preview mode.
Some other variants of the code that checks the constructor argument before
assiging the field fail with similar verification error too, but this
ternary variant is the simplest reproducer so far.