Skip to content

Getting NPE when passing null to validate method. #376

Open
@rahul22048

Description

@rahul22048

below is the code snippet:-

final JsonSchemaFactory factory = JsonSchemaFactory.byDefault();
final JsonNode node = JsonLoader.fromResource("/json-patch.json");
SCHEMA = factory.getJsonSchema(node);

in another method, i use it like this:-

ProcessingReport report = SCHEMA.validate(patchJson);

NPE exception comes when patchJson is passed as null.

for reference json-patch.json is same as the one here:- https://github.com/fge/json-schema-processor-examples/blob/master/src/main/resources/json-patch.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions