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:50:58 UTC

[commons-configuration] 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-configuration.git


The following commit(s) were added to refs/heads/master by this push:
     new 0de93ef  Use for-each.
0de93ef is described below

commit 0de93ef2f8641903a45851c2f58303abfb66ca24
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Nov 21 12:50:53 2020 -0500

    Use for-each.
---
 .../org/apache/commons/configuration2/PropertiesConfiguration.java   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java b/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java
index 1ef5e5d..5d5c882 100644
--- a/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java
+++ b/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java
@@ -1094,9 +1094,8 @@ public class PropertiesConfiguration extends BaseConfiguration
          */
         public void writeProperty(final String key, final List<?> values) throws IOException
         {
-            for (int i = 0; i < values.size(); i++)
-            {
-                writeProperty(key, values.get(i));
+            for (Object value : values) {
+                writeProperty(key, value);
             }
         }