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

   Ports the fix from **#3265** from the `2.x` branch to `main`.
   
   In the `RegexFilter.createFilter()` factory method, the `useRawMsg` 
parameter is declared as `Boolean` (boxed). When passed directly to the 
`RegexFilter(boolean raw, ...)` constructor, a `null` value causes an NPE 
during unboxing.
   
   This change uses `Boolean.TRUE.equals(useRawMsg)` instead, which safely 
handles `null` by defaulting to `false`.
   
   ## Changes
   
   - **`log4j-core/.../filter/RegexFilter.java`**: Changed `useRawMsg` → 
`Boolean.TRUE.equals(useRawMsg)` in constructor call
   - **`log4j-core-test/.../filter/RegexFilterTest.java`**: Added test ensuring 
no exception when `useRawMsg` is `null`
   


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