From 332a22d9c6414a1f2b5284ed49d32f90cfccb420 Mon Sep 17 00:00:00 2001 From: redmitry Date: Mon, 13 Nov 2023 15:14:01 +0100 Subject: [PATCH] NPE fix --- .../bsc/inb/ga4gh/beacon/validator/BeaconEndpointValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-v2-validator-code/src/main/java/es/bsc/inb/ga4gh/beacon/validator/BeaconEndpointValidator.java b/beacon-v2-validator-code/src/main/java/es/bsc/inb/ga4gh/beacon/validator/BeaconEndpointValidator.java index 9beec7c..5cf1041 100644 --- a/beacon-v2-validator-code/src/main/java/es/bsc/inb/ga4gh/beacon/validator/BeaconEndpointValidator.java +++ b/beacon-v2-validator-code/src/main/java/es/bsc/inb/ga4gh/beacon/validator/BeaconEndpointValidator.java @@ -262,7 +262,7 @@ private AbstractBeaconResponse validateEntryEndpoint(String endpoint, } final JsonObject o = value.asJsonObject().getJsonObject("response"); - if (o.containsKey("collections")) { + if (o != null && o.containsKey("collections")) { return JSONB.fromJson(json, new BeaconCollectionsResponse(){} .getClass().getGenericSuperclass());