【发布时间】:2025-11-24 18:40:01
【问题描述】:
我正在慢慢尝试在现有代码库中引入对 javadocs 的 checkStyle 检查。
似乎每次遇到描述列表、映射等的参数(@param 或 @return)。它无法解析代码并抛出错误, 有人知道如何防止这种情况吗?
例如:
/**
* Process list of people.
*
* @param account the relevant account.
* @return List<People> the people we are interested in.
* @throws SQLException
*/
private static List<People> getPeople(Account account) throws SQLException {}
所以它无法解析
* @return List<People> the people we are interested in.
并创建错误:
error: Javadoc comment at column 18 has parse error. Missed HTML close tag 'People'. Sometimes it means that close tag missed for one of previous tags.
当尝试应用不同的检查并且此 jdoc 确实/应该通过检查时会发生这种情况。
任何帮助都会很棒:)
【问题讨论】:
标签: java javadoc checkstyle