Skip to content

Commit

Permalink
style: efficient use of entryset instead of keyset
Browse files Browse the repository at this point in the history
  • Loading branch information
aliehsaeedii committed Oct 31, 2022
1 parent 0f8438b commit 2042cc7
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1791,13 +1791,13 @@ private static String toStructString (Map<String, Object> map) {
StringBuilder sb = new StringBuilder("Struct{");
boolean first = true;

for(String key : map.keySet()) {
if (first) {
first = false;
} else {
sb.append(",");
}
sb.append(key).append("=").append(map.get(key));
for (Map.Entry<String, Object> entry : map.entrySet()) {
if (first) {
first = false;
} else {
sb.append(",");
}
sb.append(entry.getKey()).append("=").append(entry.getValue());
}

return sb.append("}").toString();
Expand Down

0 comments on commit 2042cc7

Please sign in to comment.