diff --git a/CHANGELOG.md b/CHANGELOG.md
index e77c21d..c9211ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -96,3 +96,8 @@ Consequences:
WSMan namespace variants. WSMan fault exceptions additionally carry the detailed `WSManFault`
message (including the provider-level detail, e.g. WMI `WBEM_E_*` mnemonics) alongside the SOAP
reason text.
+- Code quality: the PMD report is clean and `pmd:check` now runs in `mvn verify`, so a new violation
+ of `pmd.xml` fails the build (issue #122). The cleanup is behavior-preserving — redundant
+ parentheses and modifiers removed, empty catch blocks named and commented, and two loops
+ restructured. The only signature change is the removal of the unused `target` parameter from the
+ `CipherGen` constructor (an internal NTLM helper).
diff --git a/pom.xml b/pom.xml
index 5d5105e..0cc1716 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,6 +203,31 @@
+
+
+ maven-pmd-plugin
+ 3.26.0
+
+
+ verify
+
+ check
+
+
+
+
+ ${maven.compiler.release}
+
+ pmd.xml
+
+ true
+
+
+
diff --git a/src/main/java/org/metricshub/winrm/ShareRemoteDirectoryConsumer.java b/src/main/java/org/metricshub/winrm/ShareRemoteDirectoryConsumer.java
index cc52bae..9367f36 100644
--- a/src/main/java/org/metricshub/winrm/ShareRemoteDirectoryConsumer.java
+++ b/src/main/java/org/metricshub/winrm/ShareRemoteDirectoryConsumer.java
@@ -30,5 +30,5 @@ public interface ShareRemoteDirectoryConsumer#get() and reports this as unused.
+ @SuppressWarnings("PMD.UnusedPrivateMethod")
private boolean matches(final byte[] content) {
return digestHex("SHA256".equals(algorithm) ? "SHA-256" : "SHA-1", content).equals(digest);
}
diff --git a/src/main/java/org/metricshub/winrm/WindowsRemoteExecutor.java b/src/main/java/org/metricshub/winrm/WindowsRemoteExecutor.java
index 671e343..a2ec572 100644
--- a/src/main/java/org/metricshub/winrm/WindowsRemoteExecutor.java
+++ b/src/main/java/org/metricshub/winrm/WindowsRemoteExecutor.java
@@ -41,7 +41,7 @@ public interface WindowsRemoteExecutor extends AutoCloseable {
* @throws WqlQuerySyntaxException if WQL query syntax is invalid
* @throws WindowsRemoteException For any problem encountered
*/
- public List