During testing, I noticed that I could retrieve the constructor java docs for
/**
* abc
*/
public static class A {
/**
* Lorem ipsum dolor sit amet, consectetur adipiscing elit.
*/
public A() {}
}
but not for
public static class A {
/**
* Lorem ipsum dolor sit amet, consectetur adipiscing elit.
*/
public A() {}
}
The only difference in the two classes was whether they had javadocs at the class level. Running a debugger I can see that within RuntimeJavadoc.getJavadoc(Constructor); ClassJavadoc.getConstructors() returns an empty list.
While it is unusual for a constructor to have documentation and the class to not, it can still happen.
The problem appears to be located here, notice that it looks like the constructor check is .isArray() and will always return true.
During testing, I noticed that I could retrieve the constructor java docs for
but not for
The only difference in the two classes was whether they had javadocs at the class level. Running a debugger I can see that within RuntimeJavadoc.getJavadoc(Constructor); ClassJavadoc.getConstructors() returns an empty list.
While it is unusual for a constructor to have documentation and the class to not, it can still happen.
The problem appears to be located here, notice that it looks like the constructor check is .isArray() and will always return true.
https://github.com/dnault/therapi-runtime-javadoc/blob/6cfcb5a123b2ce116dfd4cd6d63a50889c369937/therapi-runtime-javadoc-scribe/src/main/java/com/github/therapi/runtimejavadoc/internal/JsonJavadocBuilder.java#L68