Author: henning Date: Thu Aug 25 03:17:03 2005 New Revision: 240038 URL: http://svn.apache.org/viewcvs?rev=240038&view=rev Log: Found by Findbugs:
ITA: Method org.apache.commons.mail.Email.toInternetAddressArray(java.util.List) uses Collection.toArray() with zero-length array argument Modified: jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java Modified: jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java?rev=240038&r1=240037&r2=240038&view=diff ============================================================================== --- jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java (original) +++ jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java Thu Aug 25 03:17:03 2005 @@ -977,7 +977,7 @@ protected InternetAddress[] toInternetAddressArray(List list) { InternetAddress[] ia = - (InternetAddress[]) list.toArray(new InternetAddress[0]); + (InternetAddress[]) list.toArray(new InternetAddress[list.size()]); return ia; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]