You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/21 17:56:49 UTC
[commons-email] branch master updated: Use for-each.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-email.git
The following commit(s) were added to refs/heads/master by this push:
new 4f45556 Use for-each.
4f45556 is described below
commit 4f45556fc684701892ab3f83dcd09084e0515fcb
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 21 12:56:45 2020 -0500
Use for-each.
---
src/main/java/org/apache/commons/mail/util/MimeMessageParser.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/mail/util/MimeMessageParser.java b/src/main/java/org/apache/commons/mail/util/MimeMessageParser.java
index a9e4c7b..1ec152f 100644
--- a/src/main/java/org/apache/commons/mail/util/MimeMessageParser.java
+++ b/src/main/java/org/apache/commons/mail/util/MimeMessageParser.java
@@ -350,9 +350,8 @@ public class MimeMessageParser
{
DataSource dataSource;
- for (int i = 0; i < getAttachmentList().size(); i++)
- {
- dataSource = getAttachmentList().get(i);
+ for (final DataSource element : getAttachmentList()) {
+ dataSource = element;
if (name.equalsIgnoreCase(dataSource.getName()))
{
return dataSource;