From 6a7a9beca175e2555ccdde54c1e6cb8ca939db8d Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Thu, 6 Nov 2025 16:34:13 +0100 Subject: [PATCH] Add EnumComparison Add this rule manually already. Can be removed when the real rule is available (probably in PMD 7.19.0, see pmd/pmd#6193 --- .../sourceforge/pmd/pmd-dogfood-config.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml b/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml index fa0551f..dbf6c81 100644 --- a/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml +++ b/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml @@ -666,4 +666,23 @@ + + + + Enum should be compared using ==, this is more readable. Using equals() is not necessary (and is prone to NPE). + 1 + + + + + +