From 1496ae16d72e0c7e6c834367a68e47b599ab439b Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Tue, 4 Feb 2025 08:51:40 -0800 Subject: [PATCH] mark fields as final --- .../temporal/client/NamespaceInjectWorkflowServiceStubs.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/temporal-sdk/src/main/java/io/temporal/client/NamespaceInjectWorkflowServiceStubs.java b/temporal-sdk/src/main/java/io/temporal/client/NamespaceInjectWorkflowServiceStubs.java index 5d0c65a19..50340ce49 100644 --- a/temporal-sdk/src/main/java/io/temporal/client/NamespaceInjectWorkflowServiceStubs.java +++ b/temporal-sdk/src/main/java/io/temporal/client/NamespaceInjectWorkflowServiceStubs.java @@ -34,16 +34,15 @@ import java.util.function.Supplier; import javax.annotation.Nullable; +/** Inject the namespace into the gRPC header */ class NamespaceInjectWorkflowServiceStubs implements WorkflowServiceStubs { private static Metadata.Key TEMPORAL_NAMESPACE_HEADER_KEY = Metadata.Key.of("temporal-namespace", Metadata.ASCII_STRING_MARSHALLER); private final Metadata metadata; - private WorkflowServiceStubs next; - private String namespace; + private final WorkflowServiceStubs next; public NamespaceInjectWorkflowServiceStubs(WorkflowServiceStubs next, String namespace) { this.next = next; - this.namespace = namespace; this.metadata = new Metadata(); metadata.put(TEMPORAL_NAMESPACE_HEADER_KEY, namespace); }