Skip to content

Instantly share code, notes, and snippets.

@Gogetter
Last active March 31, 2022 10:11
Show Gist options
  • Select an option

  • Save Gogetter/aa75514ddb5f052daec04f23c4e2444c to your computer and use it in GitHub Desktop.

Select an option

Save Gogetter/aa75514ddb5f052daec04f23c4e2444c to your computer and use it in GitHub Desktop.

Revisions

  1. Gogetter renamed this gist Mar 31, 2022. 1 changed file with 0 additions and 0 deletions.
  2. Gogetter created this gist Mar 31, 2022.
    11 changes: 11 additions & 0 deletions EmailData.java (with compact constructor)
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    public record EmailData(
    String recipient,
    String subject,
    String message,
    Set<EmailAttachment> emailAttachments) {
    public EmailData {
    Objects.requireNonNull(recipient);
    subject = Objects.requireNonNullElse(subject, "");
    message = Objects.requireNonNullElse(message, "");
    }
    }