A RetroSearch Logo

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

Search Query:

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

[java] UnnecessaryParentheses fails to detect obvious scenario · Issue #537 · pmd/pmd · GitHub

Rule Set:
java-controversial/UnnecessaryParentheses

Description:
The rule is currently too naive, only looking for parenthesis around a single term, but fails for several other trivial scenarios.

I'm not sure this will be achievable in XPath, we may have to convert the rule to a Java one....

Code Sample demonstrating the issue:

public class Foo {
  private String getData(final String header) {
    String result = ("[" + header + ":" + Utils.decode(header) + "]");
    return result;
  }
}

Running PMD through: Any


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