Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CodenameOne/src/com/codename1/io/JSONParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,9 @@ private static void writeJsonValue(StringBuilder sb, Object o) {
sb.append('{');
boolean first = true;
Map m = (Map) o;
for (Object kObj : m.keySet()) {
Object v = m.get(kObj);
for (Object entryObj : m.entrySet()) {
Map.Entry entry = (Map.Entry) entryObj;
Object v = entry.getValue();
if (v == null) {
// Null-valued entries are dropped on purpose; if
// a caller really needs `"k":null` on the wire,
Expand All @@ -861,7 +862,7 @@ private static void writeJsonValue(StringBuilder sb, Object o) {
sb.append(',');
}
first = false;
writeJsonString(sb, kObj.toString());
writeJsonString(sb, entry.getKey().toString());
sb.append(':');
writeJsonValue(sb, v);
}
Expand Down
10 changes: 10 additions & 0 deletions maven/core-unittests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,17 @@
<id>spotbugs</id>
<phase>verify</phase>
<goals>
<!--
The `spotbugs` goal generates the XML report but does NOT
break the build on findings. The `check` goal re-uses the
report and fails the build when any bug is reported, which
is what CI relies on to surface regressions like
WMI_WRONG_MAP_ITERATOR. Both goals are bound so the report
artifact is still produced for the quality summary even
when `check` aborts the build.
-->
<goal>spotbugs</goal>
<goal>check</goal>
</goals>
</execution>
</executions>
Expand Down
Loading