From 0687b8fde31363fce6e9acbb632eb9d87f6b37f3 Mon Sep 17 00:00:00 2001 From: mloufra Date: Thu, 13 Oct 2022 08:09:56 +0000 Subject: [PATCH] address comment Signed-off-by: mloufra --- src/main/java/org/opensearch/sdk/ExtensionsRunner.java | 4 ++-- src/test/java/org/opensearch/sdk/TestNetty4Transport.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java index 8c5417fa..1357b2b1 100644 --- a/src/main/java/org/opensearch/sdk/ExtensionsRunner.java +++ b/src/main/java/org/opensearch/sdk/ExtensionsRunner.java @@ -459,10 +459,10 @@ public void startActionListener(int timeout) { */ public static void run(Extension extension) throws IOException { logger.info("Starting extension " + extension.getExtensionSettings().getExtensionName()); - @SuppressWarnings("unused") ExtensionsRunner runner = new ExtensionsRunner(extension); // initialize the transport service - new NettyTransport(runner).initializeExtensionTransportService(runner.getSettings(), new ThreadPool(runner.getSettings()), runner); + NettyTransport nettyTransport = new NettyTransport(runner); + nettyTransport.initializeExtensionTransportService(runner.getSettings(), new ThreadPool(runner.getSettings()), runner); runner.startActionListener(0); } } diff --git a/src/test/java/org/opensearch/sdk/TestNetty4Transport.java b/src/test/java/org/opensearch/sdk/TestNetty4Transport.java index 5b5013fc..06549a64 100644 --- a/src/test/java/org/opensearch/sdk/TestNetty4Transport.java +++ b/src/test/java/org/opensearch/sdk/TestNetty4Transport.java @@ -12,7 +12,6 @@ package org.opensearch.sdk; import java.io.IOException; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.opensearch.common.component.Lifecycle;