Closed
Description
I have a record with an annotated field and a compact constructor. As long as both are present in my record the formatting for the whole file does not work anymore. As soon as I remove either the annotation or the compact constructor it works again.
I am using Intellij with Java 14 Runtime to avoid issue #533.
Here is a minimal example:
package com.company;
import java.util.Objects;
import org.jetbrains.annotations.NotNull;
public record Record( @NotNull Object o ) {
public Record {
this.o = Objects.requireNonNull(o);
}
}
As far as I can tell it doesn't matter what annotation is used.
Edit: I just tried to format directly with the jar version 1.9 and get the following error:
Record.java:6:38: error: did not generate token "@"
So it is directly an error from this tool and has nothing to do with the Intellij plugin.
Metadata
Metadata
Assignees
Labels
No labels