<commit_before>package org.synyx.urlaubsverwaltung.core.mail;

import org.springframework.util.StringUtils;
import org.synyx.urlaubsverwaltung.core.person.Person;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;


/**
 * @author  <NAME> - <EMAIL>
 */
final class RecipientUtil {

    private RecipientUtil() {

        // HIDDEN
    }

    static List<String> getMailAddresses(Person... persons) {

        return getMailAddresses(Arrays.asList(persons));
    }


    static List<String> getMailAddresses(List<Person> persons) {

        return persons.stream().filter(person -> StringUtils.hasText(person.getEmail())).map(person ->
                    person.getEmail()).collect(Collectors.toList());
    }
}<commit_msg>cleanup: use method reference<commit_after>package org.synyx.urlaubsverwaltung.core.mail;

import org.springframework.util.StringUtils;
import org.synyx.urlaubsverwaltung.core.person.Person;

import java.util.Arrays;
import java.util.List;

import static java.util.stream.Collectors.toList;


/**
 * @author  <NAME> - <EMAIL>
 */
final class RecipientUtil {

    private RecipientUtil() {

        // HIDDEN
    }

    static List<String> getMailAddresses(Person... persons) {

        return getMailAddresses(Arrays.asList(persons));
    }


    static List<String> getMailAddresses(List<Person> persons) {

        return persons.stream()
            .filter(person -> StringUtils.hasText(person.getEmail()))
            .map(Person::getEmail)
            .collect(toList());
    }
}
{'fraction_non_alphanumeric': 0.12840466926070038, 'fraction_numerical': 0.0, 'mean_word_length': 3.298050139275766, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3752078', 'n_tokens_mistral': 500, 'n_tokens_neox': 479, 'n_words': 76}