https://checkstyle.org/config_javadoc.html#MissingJavadocPackage
````
$ cat package-info.java
/*
/**
import javax.annotation.ParametersAreNonnullByDefault;
$ cat TestConfig.xml
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="TreeWalker">
$ java -jar checkstyle-8.25-all.jar -c TestConfig.xml package-info.java
Starting audit...
[ERROR] /
Audit done.
````
Not expecting the violation as there is a javadoc above the package.
@romani I updated the original post. I looked at the issue briefly and it looks valid.
MissingJavadocPackageCheck has its own javadoc check and isn't using our util method that other checks rely on.
It is recent implementation, sad that we missed it during testing.
@romani Could you please describe what exactly is expected here?
https://github.com/checkstyle/checkstyle/blob/8d8e204e5ed2d900a6b070534272ff7cc8dfe17a/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocPackageCheck.java#L94
(Specifically hasJavadoc)
MissingJavadocPackageCheck shouldn't try to use its own implementation to detect what is a javadoc.
It should be using one of our JavadocUtil methods that is used in other places to detect and identify a javadoc.
We shouldn't have to duplicate the same code twice.
Fix was merged