小编use*_*822的帖子

Maven checkstyle错误:'<T>'的@param标记

我有以下通用类型的方法,但是当我运行maven checkstyle(maven-checkstyle-plugin,2.121)时,它会Expected @param tag for '<T>'在maven构建期间给出错误消息.我该如何克服这个?

/**
 * Read in specified type of object from request body.
 * @param request The HttpServletRequest
 * @param expected The expected type T
 * @return <T> specified type of object
 */
public <T extends Object> T getExpectedValue(
    final HttpServletRequest request, final Class<T> expected)
Run Code Online (Sandbox Code Playgroud)

我使用以下来关闭泛型param标签,但它没有用,我也有上面提到的java doc.

<module name="JavadocType">
    <property name="allowMissingParamTags" value="true"/>
</module>
Run Code Online (Sandbox Code Playgroud)

java generics javadoc checkstyle maven

13
推荐指数
1
解决办法
7796
查看次数

标签 统计

checkstyle ×1

generics ×1

java ×1

javadoc ×1

maven ×1