Update pmd-java/src/main/resources/category/java/errorprone.xml

This commit is contained in:
Clément Fournier authored and GitHub committed 2022-01-02 17:02:56 +01:00
1 parent 5bdd5cd1be
commit 08b9187d09
1 file changed
+1 -2
@@ -204,8 +204,7 @@ Note that Oracle has declared Object.finalize() as deprecated since JDK 9.
<![CDATA[
//MethodCall[pmd-java:matchesSig("java.lang.Object#finalize()")]
(: it's ok inside finalize :)
[not(SuperExpression and ../../../../MethodDeclaration[@Name = 'finalize'][@Arity = 0][VoidType]
and not(ancestor::Initializer))]
[not(SuperExpression and ancestor::*[self::MethodDeclaration or self::Initializer][1][@Name = 'finalize'][@Arity = 0][VoidType])]
]]>
</value>
</property>