Skip to content

Commit 8f6aa51

Browse files
committed
fix(#2): use JSONObject.keys() instead of .keySet() as Android JSONObject doesn’t support keySet()
1 parent 3a32462 commit 8f6aa51

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/io/beautifier/core/Options.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The MIT License (MIT)
2929
package io.beautifier.core;
3030

3131
import java.util.EnumSet;
32+
import java.util.Iterator;
3233

3334
import org.eclipse.jdt.annotation.NonNullByDefault;
3435
import org.eclipse.jdt.annotation.Nullable;
@@ -169,7 +170,9 @@ public io.beautifier.html.HTMLOptions.Builder html() {
169170
}
170171

171172
public void apply(JSONObject data) {
172-
for (String key : data.keySet()) {
173+
final Iterator<String> it = data.keys();
174+
while (it.hasNext()) {
175+
final String key = it.next();
173176
if (!apply(key, data)) {
174177
throw new IllegalArgumentException("Unsupported options key: " + key);
175178
}

0 commit comments

Comments
 (0)