From d86c627bc6080543ac16f957ae8c91ca6332769c Mon Sep 17 00:00:00 2001 From: zzz <48468583+beikelan@users.noreply.github.com> Date: Thu, 27 Jul 2023 19:03:29 -0700 Subject: [PATCH] fix npe when exporting hints (#40) Co-authored-by: Hui Wang --- .../operator/subscription/SubscriptionEnvironment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hoptimator-operator/src/main/java/com/linkedin/hoptimator/operator/subscription/SubscriptionEnvironment.java b/hoptimator-operator/src/main/java/com/linkedin/hoptimator/operator/subscription/SubscriptionEnvironment.java index f47aeaf..fae4f6c 100644 --- a/hoptimator-operator/src/main/java/com/linkedin/hoptimator/operator/subscription/SubscriptionEnvironment.java +++ b/hoptimator-operator/src/main/java/com/linkedin/hoptimator/operator/subscription/SubscriptionEnvironment.java @@ -37,7 +37,9 @@ public class SubscriptionEnvironment extends Resource.SimpleEnvironment { public SubscriptionEnvironment(String namespace, String name, Pipeline pipeline, Map hints) { - exportAll(hints); + if (hints != null) { + exportAll(hints); + } export("pipeline.namespace", namespace); export("pipeline.name", name); export("pipeline.avroSchema", AvroConverter.avro("com.linkedin.hoptimator", "OutputRecord",