Skip to content

Commit e268b4e

Browse files
committed
Updated one more for loop to foreach.
1 parent d8148d3 commit e268b4e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/com/nikhaldimann/inieditor/IniEditor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,9 @@ public void save(OutputStream stream) throws IOException {
500500
* @throws IOException at an I/O problem
501501
*/
502502
public void save(OutputStreamWriter streamWriter) throws IOException {
503-
Iterator<String> it = this.sectionOrder.iterator();
504503
PrintWriter writer = new PrintWriter(streamWriter, true);
505-
while (it.hasNext()) {
506-
Section sect = getSection(it.next());
504+
for (String sectionName : sectionOrder) {
505+
Section sect = getSection(sectionName);
507506
writer.println(sect.header());
508507
sect.save(writer);
509508
}

0 commit comments

Comments
 (0)