[ 
https://issues.apache.org/jira/browse/RATIS-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elek, Marton updated RATIS-173:
-------------------------------
    Attachment: RATIS-173.001.patch

> Release build is failing because of javadoc warnings
> ----------------------------------------------------
>
>                 Key: RATIS-173
>                 URL: https://issues.apache.org/jira/browse/RATIS-173
>             Project: Ratis
>          Issue Type: Bug
>    Affects Versions: 0.1.0-alpha
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>         Attachments: RATIS-173.001.patch
>
>
> The current release build can't be run because of javadoc warnings:
> {code}
> mvn  install  -Prelease -DskipTests assembly:single
> {code}
> {code}
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (module-javadocs) on 
> project ratis-common: MavenReportException: Error while generating Javadoc: 
> [ERROR] Exit code: 1 - 
> /home/elek/projects/ratis/ratis-common/src/main/java/org/apache/ratis/protocol/RaftClientReply.java:92:
>  warning: no @return
> [ERROR]   public NotLeaderException getNotLeaderException() {
> [ERROR]                             ^
> [ERROR] 
> /home/elek/projects/ratis/ratis-common/src/main/java/org/apache/ratis/protocol/RaftClientReply.java:97:
>  warning: no @return
> [ERROR]   public StateMachineException getStateMachineException() {
> [ERROR]                                ^
> [ERROR] 
> /home/elek/projects/ratis/ratis-common/src/main/java/org/apache/ratis/protocol/RaftPeer.java:44:
>  warning: no @param for id
> [ERROR]   public RaftPeer(RaftPeerId id) {
> [ERROR]          ^
> [ERROR] 
> /home/elek/projects/ratis/ratis-common/src/main/java/org/apache/ratis/protocol/RaftPeer.java:49:
>  warning: no @param for id
> [ERROR]   public RaftPeer(RaftPeerId id, InetSocketAddress address) {
> [ERROR]          ^
> {code}
> There are two options here:
>  * Fix all the occurrences
>  * Ignore the warnings
> I checked the errors for fixing them but I found multiple false positive 
> issue. Usually there is a javadoc with clear description, for example:
> {code}
> /** If this reply has {@link NotLeaderException}, return it; otherwise return 
> null. */
>   public NotLeaderException getNotLeaderException() {
>     return JavaUtils.cast(exception, NotLeaderException.class);
>   }
>   /** If this reply has {@link StateMachineException}, return it; otherwise 
> return null. */
>   public StateMachineException getStateMachineException() {
>     return JavaUtils.cast(exception, StateMachineException.class);
>   }
> {code}
> I can't see any value to repeat the mesage with a return tag here, so I 
> propose to hide the warnings and check the existence of javadoc parameters 
> with checkstyle according to more sophisticated rules.
> Note: There is a setting in our pom.xml even now to ignore the errors  but it 
> uses wrong parameter for the current javadoc plugin.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to