Skip to content

added code to test the connectvity #63

added code to test the connectvity

added code to test the connectvity #63

Triggered via pull request July 28, 2025 14:49
Status Success
Total duration 16s
Artifacts 1

code-analysis.yml

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

Annotations

5 errors and 7 warnings
Logger calls should be surrounded by log level guards.: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L108
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
Logger calls should be surrounded by log level guards.: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L105
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
Logger calls should be surrounded by log level guards.: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L104
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
Logger calls should be surrounded by log level guards.: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L99
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
Logger calls should be surrounded by log level guards.: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L51
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
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/repositories/CourtScheduleRepositoryImpl.java#L106
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
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/repositories/CourtScheduleRepositoryImpl.java#L100
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 'request' could be declared final: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L87
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 'client' could be declared final: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L84
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
Ensure that resources like this HttpClient object are closed after use: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L84
Ensure that resources (like `java.sql.Connection`, `java.sql.Statement`, and `java.sql.ResultSet` objects and any subtype of `java.lang.AutoCloseable`) are always closed after use. Failing to do so might result in resource leaks. Note: It suffices to configure the super type, e.g. `java.lang.AutoCloseable`, so that this rule automatically triggers on any subtype (e.g. `java.io.FileInputStream`). Additionally specifying `java.sql.Connection` helps in detecting the types, if the type resolution / auxclasspath is not correctly setup. Note: Since PMD 6.16.0 the default value for the property `types` contains `java.lang.AutoCloseable` and detects now cases where the standard `java.io.*Stream` classes are involved. In order to restore the old behaviour, just remove "AutoCloseable" from the types. CloseResource (Priority: 3, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#closeresource
The initializer for variable 'response' is never used (overwritten on line 95): src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L81
Reports assignments to variables that are never used before the variable is overwritten, or goes out of scope. Unused assignments are those for which 1. The variable is never read after the assignment, or 2. The assigned value is always overwritten by other assignments before the next read of the variable. The rule tracks assignements to fields of `this`, and static fields of the current class. This may cause some false positives in timing-sensitive concurrent code, which the rule cannot detect. The rule may be suppressed with the standard `@SuppressWarnings("unused")` tag. The rule subsumes {% rule "UnusedLocalVariable" %}, and {% rule "UnusedFormalParameter" %}. Those violations are filtered out by default, in case you already have enabled those rules, but may be enabled with the property `reportUnusedVariables`. Variables whose name starts with `ignored` or `unused` are filtered out, as is standard practice for exceptions. Limitations: * The rule currently cannot know which method calls throw exceptions, or which exceptions they throw. In the body of a try block, every method or constructor call is assumed to throw. This may cause false-negatives. The only other language construct that is assumed to throw is the `throw` statement, in particular, things like `assert` statements, or NullPointerExceptions on dereference are ignored. * The rule cannot resolve assignments across constructors, when they're called with the special `this(...)` syntax. This may cause false-negatives. Both of those limitations may be partly relaxed in PMD 7. UnusedAssignment (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#unusedassignment
Local variable 'res' could be declared final: src/main/java/uk/gov/hmcts/cp/repositories/CourtScheduleRepositoryImpl.java#L50
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
2.51 KB
sha256:1bfa31b0b0e9bc671c1c1ff3e767491738f1d23d5b1e0e1eb1554c66b598cbea