Skip to content

Fix YAML 1.1 boolean aliases with Jackson 3 - #4514

Open
vitoriabentes wants to merge 1 commit into
apache:2.xfrom
vitoriabentes:fix/2.x/yaml-1-1-boolean-aliases
Open

vitoriabentes wants to merge 1 commit into
apache:2.xfrom
vitoriabentes:fix/2.x/yaml-1-1-boolean-aliases

Conversation

@vitoriabentes

Copy link
Copy Markdown
Contributor

Fixes #4491.

When Jackson 3 parses YAML configuration, YAML 1.1 boolean aliases such as yes and on are retained as strings and incorrectly interpreted as false. This change normalizes YAML 1.1 aliases only when converting boolean attributes in Jackson 3 configurations, while preserving string-valued attributes such as appender names and references. It also covers includeLocation.

A regression test verifies that append: yes preserves existing file contents.

Tests are provided — mvn -pl log4j-core-test -Dtest=YamlBooleanAliasesTest surefire:test passed (17 tests); .\mvnw.cmd -pl log4j-core-test surefire:test@test-with-jackson-3 passed (2 tests).

@vitoriabentes
vitoriabentes force-pushed the fix/2.x/yaml-1-1-boolean-aliases branch from 735e8e0 to 1119e84 Compare November 22, 2026 15:20
@ramanathan1504 ramanathan1504 added async Affects asynchronous loggers or appenders bug Incorrect, unexpected, or unintended behavior of existing code configuration Affects the configuration system in a general way java Pull requests that update Java code minor API change port-to-main labels Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async Affects asynchronous loggers or appenders bug Incorrect, unexpected, or unintended behavior of existing code configuration Affects the configuration system in a general way java Pull requests that update Java code minor API change port-to-main

Projects

Development

Successfully merging this pull request may close these issues.

YAML configuration: yes/on booleans read as false when Jackson 3 is present

2 participants