-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegexFilter auto-boxing of Boolean useRawMsg can lead to NPE #3239
Comments
@ppkarwasz , please assign this to me. |
jaykataria1111
added a commit
to jaykataria1111/logging-log4j2
that referenced
this issue
Dec 3, 2024
@ppkarwasz just raised a fix for this, it was a one line change, so i did not discuss before, assuming the default value is false because that is the case for primitive types. |
jaykataria1111
added a commit
to jaykataria1111/logging-log4j2
that referenced
this issue
Dec 13, 2024
jaykataria1111
added a commit
to jaykataria1111/logging-log4j2
that referenced
this issue
Jan 7, 2025
jaykataria1111
added a commit
to jaykataria1111/logging-log4j2
that referenced
this issue
Jan 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In RegexFilter.Builder (2.24.1) the PluginAttribute for
useRawMsg
is aBoolean
defaultnull
.The
RegexFilter
constructor expects a boolean primitive.I believe, if the
useRawMsg
attribute is not set (undefined/null), auto-boxing fromBoolean
toboolean
will cause/throw a NPE which is not caught and the builder will not returnnull
as it should?Also, the 'regex' attribute should probably be defined as @required for the
isValid()
builder-functionality to work correctly.The text was updated successfully, but these errors were encountered: