kalayciburak opened a new pull request, #4259:
URL: https://github.com/apache/logging-log4j2/pull/4259

   Fixes #4254.
   
   `Style=Spock` and `Style=Kirk` never applied: `AnsiEscape.createMap` stores 
keys in root upper-case, but `JAnsiTextRenderer` looked up mixed-case special 
tokens (`Style`, `BeginToken`, `EndToken`) and merged predefined maps with 
mixed-case names such as `Name`. Lookups then fell through to 
`createSequence("Name")` and rendered an empty SGR. Predefined `entry()` values 
were also concatenated without `;` separators or a trailing `m`.
   
   This change:
   
   - treats ignore-keys in `createMap` as case-insensitive
   - reads the upper-case special tokens and merges predefined style names in 
root upper-case
   - builds predefined style sequences with `AnsiEscape.createSequence`
   
   ## Test
   
   Executed:
   
   ```
   JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 ./mvnw -pl log4j-core-test -am 
test -Dtest=JAnsiTextRendererTest -Dsurefire.failIfNoSpecifiedTests=false
   ```
   
   `JAnsiTextRendererTest`: 7 tests, 0 failures (RED then GREEN for the 
Spock/Kirk cases).
   
   ## Checklist
   
   * Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` 
otherwise
   * Focused `JAnsiTextRendererTest` passed as above
   * Changelog entry in `src/changelog/.2.x.x`
   * Tests are provided


-- 
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]

Reply via email to