diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index dc4e3d69..be34d853 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -14,7 +14,7 @@ gradle-nexus-publish-plugin = "2.0.0"
datadog-statsd = "4.4.4"
# Verify
checkstyle = "8.44"
-pmd = "6.55.0"
+pmd = "7.14.0"
jacoco = "0.8.13"
# Testing
mockito = "5.17.0"
diff --git a/openapi-validation-core/src/main/java/com/getyourguide/openapi/validation/core/log/ThrottlingOpenApiViolationHandler.java b/openapi-validation-core/src/main/java/com/getyourguide/openapi/validation/core/log/ThrottlingOpenApiViolationHandler.java
index c48d3ad4..a75fb068 100644
--- a/openapi-validation-core/src/main/java/com/getyourguide/openapi/validation/core/log/ThrottlingOpenApiViolationHandler.java
+++ b/openapi-validation-core/src/main/java/com/getyourguide/openapi/validation/core/log/ThrottlingOpenApiViolationHandler.java
@@ -31,10 +31,7 @@ private void registerLoggedMessage(OpenApiViolation openApiViolation) {
private boolean isThrottled(OpenApiViolation openApiViolation) {
var key = buildKey(openApiViolation);
var lastLoggedTime = loggedMessages.get(key);
- if (lastLoggedTime == null) {
- return false;
- }
- return lastLoggedTime.plusSeconds(waitSeconds).isAfterNow();
+ return lastLoggedTime != null && lastLoggedTime.plusSeconds(waitSeconds).isAfterNow();
}
@NonNull
diff --git a/ruleset.xml b/ruleset.xml
index 83425388..290d5f4f 100644
--- a/ruleset.xml
+++ b/ruleset.xml
@@ -12,40 +12,37 @@
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
+
+
-
-
+
-
@@ -62,31 +59,23 @@
-
+
-
-
-
-
-
-
-
-
+
-
-
+
@@ -98,7 +87,6 @@
-