How to allow At-clause should be a non-empty description? - Checkstyle - Java

I use google java style in checkstyle plugin for eclipse luna. Seeing this error in my entire java document, but I can not find how to solve it. This is insignificant, but listening to me.

my javadoc:

/**
   * This is a description of something
   * 
   * @throws Exception
   */

Error on @throws line, Error:

At-clause should have a non-empty description
+7
source share
2 answers

Generally you should write

 * @throws Exception when this exceptional condition happens

eg.

 * @throws IllegalArgumentException when num is negative

... and usually explains why this exception will happen.

+11
source

This is a generic message displayed for each parameter in the document starting with "@". Therefore, for each parameter, you must add a description.

For example:

/**
     * Searches for top cars
     * @param carSearchRequest represents CarSearchRequest body
     * @param userId represents userid
     * @return CarsResponse
     * @throws Exception when userid is null
     */
0

Source: https://habr.com/ru/post/1610994/


All Articles