Copilot commented on code in PR #2949:
URL: https://github.com/apache/groovy/pull/2949#discussion_r4306229546
##########
subprojects/groovy-yaml/build.gradle:
##########
@@ -22,12 +22,12 @@ plugins {
dependencies {
api project(':') // YamlBuilder extends GroovyObjectSupport...
- implementation
"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson}"
- implementation
"com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
- implementation
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson}"
+ implementation
"tools.jackson.dataformat:jackson-dataformat-yaml:${versions.jackson3}"
Review Comment:
The backend upgrade changes YAML scalar resolution, which
`configureForJackson2()` does not restore. For example, `new
YamlSlurper().parseText('enabled: off').enabled` changes from Boolean `false`
to the string `'off'`. That string is truthy in Groovy, so existing
configuration checks can reverse their meaning. Jackson 3.1.6 explicitly covers
this change in its [scalar-resolution
test](https://github.com/FasterXML/jackson-dataformats-text/blob/jackson-dataformats-text-3.1.6/yaml/src/test/java/tools/jackson/dataformat/yaml/deser/ParseBooleanLikeWordsAsStringsTest.java).
Preserve the previous behavior, or document the breaking input change and add
regression coverage showing that callers must use `false` instead of `off`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]