Example usage for javax.mail.internet AddressException getClass

List of usage examples for javax.mail.internet AddressException getClass

Introduction

In this page you can find the example usage for javax.mail.internet AddressException getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:com.clustercontrol.jobmanagement.util.SendApprovalMail.java

/**
 * ?????<code> InternetAddress </code>???
 *
 * @param addressList/* w ww  .ja v a  2  s  . c o  m*/
 *            ???
 * @return <code> InternetAddress </code>??
 */
private InternetAddress[] getAddress(String[] addressList) {
    InternetAddress toAddress[] = null;
    Vector<InternetAddress> list = new Vector<InternetAddress>();
    if (addressList != null) {
        for (String address : addressList) {
            try {
                list.add(new InternetAddress(address));
            } catch (AddressException e) {
                m_log.info("getAddress() : " + e.getClass().getSimpleName() + ", " + address + ", "
                        + e.getMessage());
            }
        }
        if (list.size() > 0) {
            toAddress = new InternetAddress[list.size()];
            list.copyInto(toAddress);
        }
    }
    return toAddress;
}