Skip to content
Permalink
Browse files
Use for-each.
  • Loading branch information
garydgregory committed Nov 21, 2020
1 parent 7ae8c52 commit 4f45556fc684701892ab3f83dcd09084e0515fcb
Showing 1 changed file with 2 additions and 3 deletions.
@@ -350,9 +350,8 @@ public DataSource findAttachmentByName(final String name)
{
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;

0 comments on commit 4f45556

Please sign in to comment.