如何记录Java Record参数?我指的是最终成为构造函数参数和类字段的参数。
我尝试过:
/**
* @param name the name of the animal
* @param age the age of the animal
*/
public record Animal(String name, int age)
{
}
但是IntelliJ IDEA将
@param
标记为错误。我找不到关于它应该如何工作的在线示例。我找到的最接近的讨论是https://bugs.openjdk.java.net/browse/JDK-8225055。我在JDK中找到了一些unit tests,这似乎意味着这应该能够工作。也许这是一个IDE的错误?
我使用的是OpenJDK 14+36-1461,IDEA 2020.1。
我已经针对IDEA提交了bug report。
record MyRecord { /** JavaDoc for a */ String a, ... }
- undefined