Guest User

Untitled

a guest
Aug 14th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Java code PMD complains as Method should have only one exit point
  2. public boolean validate(final Beanform[] bagdata) {
  3. final int length = bagdata.length;
  4. if (length == 4) {
  5. return true;
  6. } else if (length == 1) {
  7. result = "length==1, Length should be greater than 1";
  8. return false;
  9. } else if (length == 3) {
  10. if (bagdata[0].getCycleType() == null) {
  11. result = "Cyclic Type is null for length==3";
  12. return false;
  13. }
  14. }
  15.  
  16. return true;
  17. }
Add Comment
Please, Sign In to add comment