title: Java code PMD Complains about Cyclomatic Complexity , of 20
body: <p>When i ran PMD on my Java Code ,  one of the Error Message it is showing is 
  "The class STWeb has a Cyclomatic Complexity , of 20 " .
  Typically my java class is of this way </p>
  
  <pre><code>public class STWeb implements STWebService {
  
    public String getData(RequestData request)
    {
      validate(request);
    }
  
    public boolean validate(Data[] formdata)
    {
      if(formdata.length==1)
      //do this 
      else if(formdata.length==3)
      //do this 
      else if(formdata.length==4)
      //do this 
      else if(formdata.length&gt;4)
      //do this 
      else if(formdata.length==2)
      {
        if(formdata[0].getName.equals("OIY"))
        {
        }
      / And many more if else here 
      }
    }
  }
  </code></pre>
  
  <p>As you can see , as per my business requirements , i need to code the class 
  with many if's and  if else so the reason the cyclocomplexity has ncreased , please tell me 
  what is feasible approach  as per the standard for this ??</p>