Skip to content

Instantly share code, notes, and snippets.

@margareteldridge
Created December 5, 2021 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save margareteldridge/f9cfc5f5b04efdba3dd8136f3748999d to your computer and use it in GitHub Desktop.
Save margareteldridge/f9cfc5f5b04efdba3dd8136f3748999d to your computer and use it in GitHub Desktop.
public ReportMailer(MailDestination[] destinations) {
this.destinations = destinations;
if (destinations.length == 0)
throw new RuntimeException("dests required");
for (int i = 0; i < destinations.length; i++)
if (MailDestination.getEndpoint(destinations[i]) == null)
throw new RuntimeException("invalid endpoint");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment