感觉这个方法签名太长了。有没有更明智或更优雅的方式来重写这个?
private Email createMail(long actualFileSize, String from, String recipient, String title,
String emailContent, MultipartFile attachment,
File file) {
Email mail = null;
if (actualFileSize <= Long.parseLong(emailFileSizeLimit)) {
mail = new Email(from, recipient, title,emailContent, null, file);
} else mail = new Email(from, recipient, title,emailContent, null, null);
return mail;
}
慕工程0101907
拉莫斯之舞
相关分类