Search code examples
javagradlejavadoc

Gradle javadoc task fails with unexpected text


I'm getting the following error:

/Users/rin/Development/Java/Libs/JavaClearHttp/src/main/java/com/levelrin/javaclearhttp/record/Record.java:22: error: unexpected text
 * The {@link this#toString()} method can be useful for viewing all information at once.
       ^

The javadoc looks like this:

/**
 * It's responsible for providing the request and response records.
 * The {@link this#toString()} method can be useful for viewing all information at once.
 */

Any suggestions?


Solution

  • The this keyword caused the problem. I use the class name instead, and the problem was gone.

    Before:

    {@link this#toString()}
    

    After:

    {@link Record#toString()}