From c81fbc1e6d4b5ea9e796a53baa89c154327d4b75 Mon Sep 17 00:00:00 2001 From: zane-neo Date: Fri, 11 Oct 2024 09:13:48 +0800 Subject: [PATCH] change setInstance method to static Signed-off-by: zane-neo --- .../src/test/java/org/opensearch/bootstrap/BootstrapTests.java | 2 +- server/src/main/java/org/opensearch/bootstrap/Bootstrap.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java b/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java index 848a727f5954f..fb2bc7038f865 100644 --- a/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java +++ b/distribution/tools/keystore-cli/src/test/java/org/opensearch/bootstrap/BootstrapTests.java @@ -150,7 +150,7 @@ public void testInitExecutionOrder() throws Exception { LogConfigurator.registerErrorListener(); Bootstrap testBootstrap = new Bootstrap(mockThread, mockNode); - testBootstrap.setInstance(testBootstrap); + Bootstrap.setInstance(testBootstrap); Bootstrap.startInstance(testBootstrap); diff --git a/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java index e085adf2a01da..757e2c9da6e49 100644 --- a/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java +++ b/server/src/main/java/org/opensearch/bootstrap/Bootstrap.java @@ -94,7 +94,7 @@ final class Bootstrap { private final Spawner spawner = new Spawner(); // For testing purpose - void setInstance(Bootstrap bootstrap) { + static void setInstance(Bootstrap bootstrap) { INSTANCE = bootstrap; }