private InternetAddress pullFromGroups(final Matcher m) { InternetAddress currentInternetAddress; final String[] parts = _calcMatcherParts(m); if (parts[1] == null || parts[2] == null) { return null; } // if for some reason you want to require that the result be re-parsable by // InternetAddress, you // could uncomment the appropriate stuff below, but note that not all the utility // functions use pullFromGroups; some call getMatcherParts directly. try { //currentInternetAddress = new InternetAddress(parts[0] + " <" + parts[1] + "@" + // parts[2]+ ">", true); // so it parses it OK, but since javamail doesn't extract too well // we make sure that the consistent parts // are correct currentInternetAddress = new InternetAddress(); currentInternetAddress.setPersonal(parts[0]); currentInternetAddress.setAddress(parts[1] + "@" + parts[2]); } catch (final UnsupportedEncodingException uee) { currentInternetAddress = null; } return currentInternetAddress; }
final String[] mailboxMatcherParts = mailboxMatcherMatches ? _calcMatcherParts(mailboxMatcher) : null;
private InternetAddress pullFromGroups(final Matcher m) { InternetAddress currentInternetAddress; final String[] parts = _calcMatcherParts(m); if (parts[1] == null || parts[2] == null) { return null; } // if for some reason you want to require that the result be re-parsable by // InternetAddress, you // could uncomment the appropriate stuff below, but note that not all the utility // functions use pullFromGroups; some call getMatcherParts directly. try { //currentInternetAddress = new InternetAddress(parts[0] + " <" + parts[1] + "@" + // parts[2]+ ">", true); // so it parses it OK, but since javamail doesn't extract too well // we make sure that the consistent parts // are correct currentInternetAddress = new InternetAddress(); currentInternetAddress.setPersonal(parts[0]); currentInternetAddress.setAddress(parts[1] + "@" + parts[2]); } catch (final UnsupportedEncodingException uee) { currentInternetAddress = null; } return currentInternetAddress; }
final String[] mailboxMatcherParts = mailboxMatcherMatches ? _calcMatcherParts(mailboxMatcher) : null;