commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
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 GMT
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)
         {



Mime
View raw message