title: PMD Avoid using a branching statement as the last in a loop
body: <p>I'm using the following code to iterate through table cells and gettext of a link.</p>
  
  <pre><code>@FindBy(xpath = "//table[@id='classificationResults']/tbody/tr/td[3]/a")
  private List&lt;WebElement&gt; nameColumnRows;
  
    public String getNameLinkText() {
           for (WebElement element: nameColumnRows) {
               return element.getText();
           }
         return "could not find name links";
     }
  </code></pre>
  
  <p>This works fine for me. However the PMD giving the following error. 
  <strong>Avoid using a branching statement as the last in a loop.</strong></p>
  
  <p>My question is whether I should ignore the warning or use some other approach to when iterating through table rows/cells, columns.</p>
  
  <p>Thanks,</p>