dnault/therapi-runtime-javadoc

Using empty {@code} block results in NullPointerException.

Opened this issue · 0 comments

How to reproduce:

Add {@code} to any javadoc comment.

Actual behavior:

java.lang.NullPointerException: Cannot invoke "String.length()" because "value" is null
        at com.github.therapi.runtimejavadoc.ToHtmlStringCommentVisitor.escapeHtml(ToHtmlStringCommentVisitor.java:72)
        at com.github.therapi.runtimejavadoc.ToHtmlStringCommentVisitor.inlineTag(ToHtmlStringCommentVisitor.java:36)
        at com.github.therapi.runtimejavadoc.InlineTag.visit(InlineTag.java:39)
        at com.github.therapi.runtimejavadoc.Comment.visit(Comment.java:61)
        at com.github.therapi.runtimejavadoc.CommentFormatter.format(CommentFormatter.java:37)

Expected behavior:

Should either support empty code blocks, or print a text helping to find an documentation problem.