From df73636f4cbd37249d49d539c059ad83a1d2093a Mon Sep 17 00:00:00 2001 From: Jitendra Dhawan Date: Thu, 21 Nov 2024 17:01:24 +0530 Subject: [PATCH] add null check in constructor to initialize excluded services as empty set --- .../java/io/appform/ranger/core/finderhub/ServiceFinderHub.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ranger-core/src/main/java/io/appform/ranger/core/finderhub/ServiceFinderHub.java b/ranger-core/src/main/java/io/appform/ranger/core/finderhub/ServiceFinderHub.java index d01ad3ff..f2ecd452 100644 --- a/ranger-core/src/main/java/io/appform/ranger/core/finderhub/ServiceFinderHub.java +++ b/ranger-core/src/main/java/io/appform/ranger/core/finderhub/ServiceFinderHub.java @@ -103,7 +103,7 @@ public ServiceFinderHub( Collections.emptyList(), 10_000)); this.refresherPool = createRefresherPool(); - this.excludedServices = excludedServices; + this.excludedServices = Objects.requireNonNullElseGet(excludedServices, Set::of); } public Optional> finder(final Service service) {