Skip to content

Dev/connection impl #89

Dev/connection impl

Dev/connection impl #89

Triggered via pull request August 13, 2025 10:49
Status Success
Total duration 19s
Artifacts 1

code-analysis.yml

on: pull_request
pmd-analysis
14s
pmd-analysis
Fit to window
Zoom out
Zoom in

Annotations

1 error and 5 warnings
Logger calls should be surrounded by log level guards.: src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java#L39
Whenever using a log level, one should check if it is actually enabled, or otherwise skip the associate String creation and manipulation, as well as any method calls. An alternative to checking the log level are substituting parameters, formatters or lazy logging with lambdas. The available alternatives depend on the actual logging framework. GuardLogStatement (Priority: 2, Ruleset: Best Practices) https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#guardlogstatement
Local variable 'headers' could be declared final: src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java#L70
A local variable assigned only once can be declared final. LocalVariableCouldBeFinal (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#localvariablecouldbefinal
Parameter 'caseUrn' is not assigned and could be declared final: src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java#L60
Reports method and constructor parameters that can be made final because they are never reassigned within the body of the method. This rule ignores unused parameters so as not to overlap with the rule {% rule java/bestpractices/UnusedFormalParameter %}. It will also ignore the parameters of abstract methods. MethodArgumentCouldBeFinal (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#methodargumentcouldbefinal
A method should have only one exit point, and that should be the last statement in the method: src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java#L54
A method should have only one exit point, and that should be the last statement in the method. OnlyOneReturn (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#onlyonereturn
Local variable 'body' could be declared final: src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java#L42
A local variable assigned only once can be declared final. LocalVariableCouldBeFinal (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#localvariablecouldbefinal
Local variable 'responseEntity' could be declared final: src/main/java/uk/gov/hmcts/cp/services/CaseUrnMapperService.java#L33
A local variable assigned only once can be declared final. LocalVariableCouldBeFinal (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#localvariablecouldbefinal

Artifacts

Produced during runtime
Name Size Digest
PMD Report Expired
1.4 KB
sha256:e2cc3109c4d45b3f6815c4cb659d8f4fbb9fcc97ba59b94670a35efcb96749dc