Skip to content

PMD - pull_request #897

PMD - pull_request

PMD - pull_request #897

Triggered via pull request October 31, 2025 11:39
Status Success
Total duration 22s
Artifacts 1

check-pmd.yml

on: pull_request
pmd_analyse
18s
pmd_analyse
Fit to window
Zoom out
Zoom in

Annotations

1 error
Useless parentheses around `null != samplingRate && Float.parseFloat(sampli...`.: powertools-logging/powertools-logging-log4j/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/PowertoolsResolver.java#L116
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: 1, Ruleset: Code Style) https://docs.pmd-code.org/snapshot/pmd_rules_java_codestyle.html#uselessparentheses

Artifacts

Produced during runtime
Name Size Digest
PMD Report Expired
1.23 KB
sha256:5285da14afe17ae5f1e0ad15e8c4485f4494235633c04cd432140e48f063f4d3