How is one supposed to document Java Record parameters? I am referring to the parameters that end up becoming constructor parameters, class fields.
I tried:
/**
* @param name the name of the animal
* @param age the age of the animal
*/
public record Animal(String name, int age)
{
}
but IntelliJ IDEA flags @param
s as an error. I couldn't find an online example of how this is supposed to work. The closest discussion I found is https://bugs.openjdk.java.net/browse/JDK-8225055.
I found some unit tests in the JDK that seem to imply this should be working. Perhaps this is an IDE bug?
I am using OpenJDK 14+36-1461, IDEA 2020.1.
I filed a bug report against IDEA just in case.