Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 86F30200C3E for ; Tue, 21 Mar 2017 16:53:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 85AA3160B74; Tue, 21 Mar 2017 15:53:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F2CA2160B68 for ; Tue, 21 Mar 2017 16:53:20 +0100 (CET) Received: (qmail 75815 invoked by uid 500); 21 Mar 2017 15:53:19 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 75806 invoked by uid 99); 21 Mar 2017 15:53:19 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2017 15:53:19 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id B7C783A05B4 for ; Tue, 21 Mar 2017 15:53:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1787995 - /commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java Date: Tue, 21 Mar 2017 15:53:18 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170321155318.B7C783A05B4@svn01-us-west.apache.org> archived-at: Tue, 21 Mar 2017 15:53:21 -0000 Author: sebb Date: Tue Mar 21 15:53:18 2017 New Revision: 1787995 URL: http://svn.apache.org/viewvc?rev=1787995&view=rev Log: Simplify: parameter value is now always a String Missed a couple of String.toString() calls Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java?rev=1787995&r1=1787994&r2=1787995&view=diff ============================================================================== --- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java (original) +++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java Tue Mar 21 15:53:18 2017 @@ -1914,14 +1914,14 @@ public abstract class Email { throw new IllegalArgumentException("name can not be null or empty"); } - if (value == null || EmailUtils.isEmpty(value.toString())) + if (value == null || EmailUtils.isEmpty(value)) { throw new IllegalArgumentException("value can not be null or empty"); } try { - return MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value.toString(), this.charset, null)); + return MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value, this.charset, null)); } catch (final UnsupportedEncodingException e) {