Simplify code by using for-each loop

See gh-15563
This commit is contained in:
igor-suhorukov
2018-12-25 00:06:13 +03:00
committed by Stephane Nicoll
parent cc5624efc4
commit dfb3cd51bc
3 changed files with 6 additions and 6 deletions

View File

@@ -65,8 +65,8 @@ public class JSONArray {
public JSONArray(Collection copyFrom) {
this();
if (copyFrom != null) {
for (Iterator it = copyFrom.iterator(); it.hasNext();) {
put(JSONObject.wrap(it.next()));
for (Object value : copyFrom) {
put(JSONObject.wrap(value));
}
}
}