
resources.report.rules.pmd.UnnecessaryParentheses.html Maven / Gradle / Ivy
UnnecessaryParentheses
UnnecessaryParentheses
Sometimes expressions are wrapped in unnecessary parentheses,
making them look like a function call.
This rule is defined by the following XPath expression:
//Expression
/PrimaryExpression
/PrimaryPrefix
/Expression[count(*)=1]
/PrimaryExpression
/PrimaryPrefix
Example:
public class Foo {
boolean bar() {
return (true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy