Summary
The PMD report (generated by mvn site, PMD 7.7.0, ruleset pmd.xml) flags 89 violations. They are currently report-only — PMD does not gate mvn verify — so the build is green, but the findings should be cleaned up (and once clean, we can consider enabling pmd:check to keep it that way).
Full report: PMD page of the Maven site (pmd.html), raw XML at target/pmd.xml.
Breakdown by rule
| Count |
Rule |
Ruleset |
Notes |
| 68 |
UselessParentheses |
Code Style |
Mostly mechanical; concentrated in light/MD4.java and light/Envelopes.java, plus WsmanClient, WinRMEndpoint, NTLMMessage, Type1Message, WmiHelper. |
| 11 |
UnnecessaryModifier |
Code Style |
public on interface methods (WindowsRemoteExecutor, ShareRemoteDirectoryConsumer) and final on try-with-resources vars (WinRMCommandExecutor, WinRMWqlExecutor, ByteArrayUtils, NtlmCrypto). |
| 6 |
EmptyCatchBlock |
Error Prone |
light/HttpTransport.java (×3), KerberosAuthScheme, Type3Message, WsmanClient. Add an explanatory comment or handle. |
| 2 |
AvoidBranchingStatementAsLastInLoop |
Error Prone |
NtlmCrypto.Cursor.skipUntil, WsmanClient.request. |
| 1 |
EmptyControlStatement |
Code Style |
Empty while in HttpTransport.readChunked. |
| 1 |
UnusedFormalParameter |
Best Practices |
Unused constructor parameter target in light/CipherGen.java. |
Notes
- The bulk (
UselessParentheses, UnnecessaryModifier) is mechanical and safe to auto-fix.
- The
EmptyCatchBlock / EmptyControlStatement cases deserve a look each — most are deliberate (best-effort cleanup, draining a stream); add a short comment so PMD (and readers) can see the intent, or suppress narrowly.
- Some
light/* classes (MD4, CipherGen, NTLM messages) are ports of reference NTLM/crypto code; if we want to keep them close to upstream, consider a targeted suppression rather than reformatting.
Acceptance criteria
- PMD report shows 0 violations (or only explicitly justified
@SuppressWarnings("PMD.<rule>") / // NOPMD with a reason).
mvn verify site still green.
Summary
The PMD report (generated by
mvn site, PMD 7.7.0, rulesetpmd.xml) flags 89 violations. They are currently report-only — PMD does not gatemvn verify— so the build is green, but the findings should be cleaned up (and once clean, we can consider enablingpmd:checkto keep it that way).Full report: PMD page of the Maven site (
pmd.html), raw XML attarget/pmd.xml.Breakdown by rule
UselessParentheseslight/MD4.javaandlight/Envelopes.java, plusWsmanClient,WinRMEndpoint,NTLMMessage,Type1Message,WmiHelper.UnnecessaryModifierpublicon interface methods (WindowsRemoteExecutor,ShareRemoteDirectoryConsumer) andfinalon try-with-resources vars (WinRMCommandExecutor,WinRMWqlExecutor,ByteArrayUtils,NtlmCrypto).EmptyCatchBlocklight/HttpTransport.java(×3),KerberosAuthScheme,Type3Message,WsmanClient. Add an explanatory comment or handle.AvoidBranchingStatementAsLastInLoopNtlmCrypto.Cursor.skipUntil,WsmanClient.request.EmptyControlStatementwhileinHttpTransport.readChunked.UnusedFormalParametertargetinlight/CipherGen.java.Notes
UselessParentheses,UnnecessaryModifier) is mechanical and safe to auto-fix.EmptyCatchBlock/EmptyControlStatementcases deserve a look each — most are deliberate (best-effort cleanup, draining a stream); add a short comment so PMD (and readers) can see the intent, or suppress narrowly.light/*classes (MD4,CipherGen, NTLM messages) are ports of reference NTLM/crypto code; if we want to keep them close to upstream, consider a targeted suppression rather than reformatting.Acceptance criteria
@SuppressWarnings("PMD.<rule>")/// NOPMDwith a reason).mvn verify sitestill green.