| The resolution of this bug is "fixed", but I'm seeing this problem on Jenkins 2.190.2. Does that indicate a regression, or was the "fix" here to just use the workaround? I would have expected that the implementation of writeJSON would do the following
// given a mapLikeObject containing data, and an outputPath
try {
writeJSON file: outputPath, json: mapLikeObject, pretty: 2
} catch (java.lang.UnsupportedOperationException e) {
def jsonOut = readJSON text: groovy.json.JsonOutput.toJson(mapLikeObject)
writeJSON file: outputPath, json: jsonOut, pretty: 2
}
i.e. falling back on conversion to string and back in cases where an incompatible object is passed to writeJSON. Should this bug be reopened or should I file a new one? |