Skip to content
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

NPE in PluginElementVisitor findNamedNode #1391

Closed
azakordonets opened this issue Mar 26, 2023 · 0 comments
Closed

NPE in PluginElementVisitor findNamedNode #1391

azakordonets opened this issue Mar 26, 2023 · 0 comments
Milestone

Comments

@azakordonets
Copy link
Contributor

azakordonets commented Mar 26, 2023

Description

In PluginElementVisitor -> findNamedNode there's no check whether childType is null or not. Therefore it can throw nullpointer sometimes.

Configuration

Version: 2.20.0

Operating system: Mac OS 13.1

JDK: amazon-corretto-11.jdk

if (childType == null) {
     //System.out.println();
}
if (name.equalsIgnoreCase(childType.getElementName()) ||
 this.conversionType.isAssignableFrom(childType.getPluginClass())) {
 // FIXME: check child.getObject() for null?

if childType is null, then the check won't do anything and nullpointer will be thrown on the next if statement

I have already create PR to fix this issue

vy added a commit that referenced this issue Mar 27, 2023
@vy vy added this to the 2.21.0 milestone Mar 27, 2023
@vy vy closed this as completed Mar 27, 2023
theit pushed a commit to theit/logging-log4j2 that referenced this issue May 30, 2023
@ppkarwasz ppkarwasz modified the milestones: 2.21.0, 2.20.1 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants