title: PMD rules confliction:A method should have only one exit point, and that should be the last statement in the method
body: <p>sometimes I found that a few PMD rules conflict with each other, therefore you can not write code that satisfies all PMD rules. </p>
  
  <p>For example, it seems the following two rules exclude with each other:
  "Assigning an Object to null is a code smell. Consider refactoring."
  and 
  "A method should have only one exit point, and that should be the last statement in the method"</p>
  
  <p>The following is my example code:</p>
  
  <p><img src="https://i.stack.imgur.com/hyH57.jpg" alt="enter image description here"></p>
  
  <p>if I use get1(), I will violate the former rule, and if I use get2(), then I will violate the latter rule. I prefer that A method should have only one exit point, but I don't want PMD reports that "Assigning an Object to null is a code smell", does anybody have any good idea? Thanks a lot :)</p>