Getting Rid of Nasty Parameters
· 6 min read
I bet you’ve seen code like this when your IDE auto-completed a function call in your code and there’s no source code or Javadoc found:
EmailSender.class
emailSender.sendEmail(String arg1,
InternetAddress arg2, InternetAddress arg3, InternetAddress arg4,
String arg5, String arg6, List<EmailAttachment> arg7);
PMD will annotate this code as a violation of the rule "Getting Rid of Nasty Parameters."