From b30a3bff6512674cec2e5d41e0db80d669f50fc2 Mon Sep 17 00:00:00 2001 From: Morgan Kleene Date: Tue, 26 Nov 2024 11:26:19 -0500 Subject: [PATCH] Update TDF.java --- sdk/src/main/java/io/opentdf/platform/sdk/TDF.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/src/main/java/io/opentdf/platform/sdk/TDF.java b/sdk/src/main/java/io/opentdf/platform/sdk/TDF.java index 5ae6c016..dd87debf 100644 --- a/sdk/src/main/java/io/opentdf/platform/sdk/TDF.java +++ b/sdk/src/main/java/io/opentdf/platform/sdk/TDF.java @@ -431,6 +431,10 @@ public TDFObject createTDF(InputStream payload, tdfConfig.attributes.toArray(new AttributeValueFQN[0])); } + if (granter == null) { + throw new AutoConfigureException("Failed to create Granter"); // Replace with appropriate error handling + } + List dk = defaultKases(tdfConfig); tdfConfig.splitPlan = granter.plan(dk, () -> UUID.randomUUID().toString());