Skip to content

NPE in PluginElementVisitor findNamedNode #1391

Closed
@azakordonets

Description

@azakordonets

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions