A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/1673 below:

[java] UselessParentheses false positive with conditional operator · Issue #1673 · pmd/pmd · GitHub

Affects PMD Version: 6.11.0
Rule: UselessParentheses

Code Sample demonstrating the issue:

throw new IllegalArgumentException(String.format(
        "Unsupported client with class '%s' given",
        (discordClient == null) ? null : discordClient.getClass()));

Additionally, should we add properties to allow whitelisting some scenarios, such as this one?

while ((result instanceof CompletionException) && (cause != null)) {
    result = cause;
    cause = result.getCause();
}

Running PMD through: Gradle


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4