removed JSONStringArgumentWriter and its dependencies #1279
Annotations
10 errors and 10 warnings
|
Run pmd/pmd-github-action@v2:
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
|
|
Run pmd/pmd-github-action@v2:
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
|
|
Run pmd/pmd-github-action@v2:
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L227
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L205
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L200
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L164
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L87
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L81
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/ClientOptions.java#L92
Calls to a collection's `toArray(E[])` method should specify a target array of zero size. This allows the JVM
to optimize the memory allocation and copying as much as possible.
Previous versions of this rule (pre PMD 6.0.0) suggested the opposite, but current JVM implementations
perform always better, when they have full control over the target array. And allocation an array via
reflection is nowadays as fast as the direct allocation.
See also [Arrays of Wisdom of the Ancients](https://shipilev.net/blog/2016/arrays-wisdom-ancients/)
Note: If you don't need an array of the correct type, then the simple `toArray()` method without an array
is faster, but returns only an array of type `Object[]`.
OptimizableToArrayCall (Priority: 3, Ruleset: Performance)
https://docs.pmd-code.org/snapshot/pmd_rules_java_performance.html#optimizabletoarraycall
|
|
Run pmd/pmd-github-action@v2:
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L264
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L229
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L219
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.
**Deprecated:** This rule is deprecated since PMD 7.18.0 and will be removed with PMD 8.0.0.
This rule has been subsumed by {% rule AvoidCatchingGenericException %},
which is now configurable as to which exceptions cause a violation.
AvoidCatchingThrowable (Priority: 3, Ruleset: Error Prone)
https://docs.pmd-code.org/snapshot/pmd_rules_java_errorprone.html#avoidcatchingthrowable
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L200
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L119
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L111
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L82
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
|
|
Run pmd/pmd-github-action@v2:
common/client/src/main/java/zingg/common/client/Client.java#L38
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
|
Loading