diff --git a/docs/pages/pmd/rules/java/codestyle.md b/docs/pages/pmd/rules/java/codestyle.md index 1e267004bc..88aab345da 100644 --- a/docs/pages/pmd/rules/java/codestyle.md +++ b/docs/pages/pmd/rules/java/codestyle.md @@ -1693,7 +1693,7 @@ Detects when a class or interface does not have a package definition. **This rule is defined by the following XPath expression:** ``` xpath -//ClassOrInterfaceDeclaration[count(preceding::PackageDeclaration) = 0] +/CompilationUnit[not(./PackageDeclaration)]/TypeDeclaration[1] ``` **Example(s):**