title: How to include "Useless parentheses" rule in PMD
body: <p>I found so many reference to exclude "Useless parentheses" from PMD. But I want to include this rule. My problem is, instead of having multiple useless parentheses and run pmd, I am not getting any PMD error. Please tell me how to enable this rule so that i can get PMD error - "Useless Parentheses".</p>
  
  <p>In my ruleset.xml, It is written</p>
  
  <p></p>
  
  <p>Here is my ruleset.xml</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;ruleset name="Custom ruleset"
           xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"&gt;
  
  
      &lt;description&gt;
          NOTE !!!!  NOTE !!!!NOTE !!!!NOTE !!!!NOTE !!!!
          This list should be somewhat static. I have disabled most of the annoying checks.
          That said if we need to exclude rules we can.
          If there are specific instances we can use suppressions like:
          @SuppressWarnings("PMD.UseUtilityClass")  //Doesn't make sense as this is main...
          if we need to, but for the most part I would like to avoid suppressing and ignoring.
          If you do suppress, provide a note why.
          NOTE !!!!NOTE !!!!NOTE !!!!NOTE !!!!NOTE !!!!NOTE !!!!
      &lt;/description&gt;
  
      &lt;rule ref="rulesets/java/basic.xml"/&gt;
      &lt;rule ref="rulesets/java/braces.xml"/&gt;
      &lt;rule ref="rulesets/java/clone.xml"/&gt;
      &lt;rule ref="rulesets/java/codesize.xml"/&gt;
      &lt;!--&lt;rule ref="rulesets/java/comments.xml"/&gt;--&gt;
      &lt;rule ref="rulesets/java/coupling.xml"&gt;
          &lt;exclude name="LawOfDemeter"/&gt;
          &lt;exclude name="LoosePackageCoupling"/&gt;
      &lt;/rule&gt;
  
      &lt;rule ref="rulesets/java/design.xml"&gt;
          &lt;exclude name="ConfusingTernary"/&gt;
          &lt;exclude name="UseLocaleWithCaseConversions"/&gt;
      &lt;/rule&gt;
  
      &lt;rule ref="rulesets/java/empty.xml"/&gt;
      &lt;rule ref="rulesets/java/finalizers.xml"/&gt;
      &lt;!--&lt;rule ref="rulesets/java/imports.xml"/&gt;--&gt;
      &lt;rule ref="rulesets/java/javabeans.xml"&gt;
          &lt;exclude name="BeanMembersShouldSerialize"/&gt;
      &lt;/rule&gt;
      &lt;rule ref="rulesets/java/junit.xml"/&gt;
      &lt;rule ref="rulesets/java/logging-java.xml"&gt;
          &lt;exclude name="GuardLogStatementJavaUtil"/&gt;  &lt;!--This rule assumes that we are using Log4J where a guard is needed
                                               but we are using slf4j where the guard isn't needed hence this is excluded  --&gt;
      &lt;/rule&gt;
      &lt;rule ref="rulesets/java/optimizations.xml"&gt;
          &lt;exclude name="LocalVariableCouldBeFinal"/&gt;
          &lt;exclude name="MethodArgumentCouldBeFinal"/&gt;
          &lt;exclude name="AvoidInstantiatingObjectsInLoops"/&gt;
      &lt;/rule&gt;
      &lt;rule ref="rulesets/java/strictexception.xml"/&gt;
      &lt;rule ref="rulesets/java/strings.xml"/&gt;
      &lt;rule ref="rulesets/java/sunsecure.xml"/&gt;
      &lt;rule ref="rulesets/java/unnecessary.xml"/&gt;
      &lt;!--&lt;rule ref="rulesets/java/unusedcode.xml"/&gt;--&gt;
  
  &lt;/ruleset&gt;
  </code></pre>