Skip to content

Issue 1084 document update for inc #1146

Issue 1084 document update for inc

Issue 1084 document update for inc #1146

Triggered via pull request October 27, 2025 06:33
Status Success
Total duration 40s
Artifacts 1

pmd.yml

on: pull_request
PMD Static Code Analysis
31s
PMD Static Code Analysis
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 10 warnings
Logger calls should be surrounded by log level guards.: common/client/src/main/java/zingg/common/client/ClientOptions.java#L175
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.: common/client/src/main/java/zingg/common/client/ClientOptions.java#L159
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.: common/client/src/main/java/zingg/common/client/ClientOptions.java#L158
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.: common/client/src/main/java/zingg/common/client/Client.java#L229
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.: common/client/src/main/java/zingg/common/client/Client.java#L207
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.: common/client/src/main/java/zingg/common/client/Client.java#L202
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.: common/client/src/main/java/zingg/common/client/Client.java#L166
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.: common/client/src/main/java/zingg/common/client/Client.java#L161
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.: common/client/src/main/java/zingg/common/client/Client.java#L89
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.: common/client/src/main/java/zingg/common/client/Client.java#L83
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 should be defined private static final and have the correct class: common/client/src/main/java/zingg/common/client/ClientOptions.java#L42
A logger should normally be defined private static final and be associated with the correct class. `private final Log log;` is also allowed for rare cases where loggers need to be passed around, with the restriction that the logger needs to be passed into the constructor. ProperLogger (Priority: 3, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#properlogger
This statement should have braces: common/client/src/main/java/zingg/common/client/Client.java#L266
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
This statement should have braces: common/client/src/main/java/zingg/common/client/Client.java#L231
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
A catch statement should never catch throwable since it includes errors.: common/client/src/main/java/zingg/common/client/Client.java#L221
Catching Throwable errors is not recommended since its scope is very broad. It includes runtime issues such as OutOfMemoryError that should be exposed and managed separately. AvoidCatchingThrowable (Priority: 3, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#avoidcatchingthrowable
This statement should have braces: common/client/src/main/java/zingg/common/client/Client.java#L202
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
Useless parentheses around `args`.: common/client/src/main/java/zingg/common/client/Client.java#L121
Parenthesized expressions are used to override the default operator precedence rules. Parentheses whose removal would not change the relative nesting of operators are unnecessary, because they don't change the semantics of the enclosing expression. Some parentheses that strictly speaking are unnecessary, may still be considered useful for readability. This rule allows to ignore violations on two kinds of unnecessary parentheses: - "Clarifying" parentheses, which separate operators of difference precedence. While unnecessary, they make precedence rules explicit, which may be useful for rarely used operators. For example: ```java (a + b) & c // is equivalent to `a + b & c`, but probably clearer ``` Unset the property `ignoreClarifying` to report them. - "Balancing" parentheses, which are unnecessary but visually balance out another pair of parentheses around an equality operator. For example, those two expressions are equivalent: ```java (a == null) != (b == null) a == null != (b == null) ``` The parentheses on the right are required, and the parentheses on the left are just more visually pleasing. Unset the property `ignoreBalancing` to report them. UselessParentheses (Priority: 4, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#uselessparentheses
Do not use `new Long(...)`, prefer `Long.valueOf(...)`: common/client/src/main/java/zingg/common/client/Client.java#L113
Reports usages of primitive wrapper constructors. They are deprecated since Java 9 and should not be used. Even before Java 9, they can be replaced with usage of the corresponding static `valueOf` factory method (which may be automatically inserted by the compiler since Java 1.5). This has the advantage that it may reuse common instances instead of creating a new instance each time. Note that for `Boolean`, the named constants `Boolean.TRUE` and `Boolean.FALSE` are preferred instead of `Boolean.valueOf`. PrimitiveWrapperInstantiation (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation
This statement should have braces: common/client/src/main/java/zingg/common/client/Client.java#L84
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else' statements and loop statements, even if they are optional. This usually makes the code clearer, and helps prepare the future when you need to add another statement. That said, this rule lets you control which statements are required to have braces via properties. From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces, and IfElseStmtMustUseBraces. ControlStatementBraces (Priority: 3, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#controlstatementbraces
Thrown exception does not preserve the stack trace of exception 'e' on all code paths: common/client/src/main/java/zingg/common/client/Client.java#L67
Reports exceptions that are thrown from within a catch block, yet don't refer to the exception parameter declared by that catch block. The stack trace of the original exception could be lost, which makes the thrown exception less informative. To preserve the stack trace, the original exception may be used as the cause of the new exception, using `Throwable#initCause`, or passed as a constructor argument to the new exception. It may also be preserved using `Throwable#addSuppressed`. The rule actually assumes that any method or constructor that takes the original exception as argument preserves the original stack trace. The rule allows `InvocationTargetException` and `PrivilegedActionException` to be replaced by their cause exception. The discarded part of the stack trace is in those cases only JDK-internal code, which is not very useful. The rule also ignores exceptions whose name starts with `ignored`. PreserveStackTrace (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#preservestacktrace
Logger should be defined private static final and have the correct class: common/client/src/main/java/zingg/common/client/Client.java#L39
A logger should normally be defined private static final and be associated with the correct class. `private final Log log;` is also allowed for rare cases where loggers need to be passed around, with the restriction that the logger needs to be passed into the constructor. ProperLogger (Priority: 3, Ruleset: Error Prone) https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#properlogger

Artifacts

Produced during runtime
Name Size Digest
PMD Report
59.4 KB
sha256:66d19b595b9d86c1e568a3e08578176cb00394df9501077e739a857a25418a4c