From 5af481b1061ea01d3b03f7b3bc09d41e502204e2 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Thu, 5 Oct 2023 13:11:58 -0400 Subject: [PATCH] Revert access modifier changes Signed-off-by: Craig Perkins --- .../org/opensearch/http/netty4/Netty4HeaderVerifierIT.java | 1 + .../{http/netty4 => transport}/Netty4BlockingPlugin.java | 3 ++- .../java/org/opensearch/transport/Netty4ModulePlugin.java | 2 +- .../java/org/opensearch/http/AbstractHttpServerTransport.java | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) rename modules/transport-netty4/src/internalClusterTest/java/org/opensearch/{http/netty4 => transport}/Netty4BlockingPlugin.java (97%) diff --git a/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HeaderVerifierIT.java b/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HeaderVerifierIT.java index 94e7a3240454b..ed715fd918077 100644 --- a/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HeaderVerifierIT.java +++ b/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HeaderVerifierIT.java @@ -29,6 +29,7 @@ import io.netty.handler.codec.http.HttpVersion; import io.netty.handler.codec.http2.HttpConversionUtil; import io.netty.util.ReferenceCounted; +import org.opensearch.transport.Netty4BlockingPlugin; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4BlockingPlugin.java b/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/transport/Netty4BlockingPlugin.java similarity index 97% rename from modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4BlockingPlugin.java rename to modules/transport-netty4/src/internalClusterTest/java/org/opensearch/transport/Netty4BlockingPlugin.java index d1bc1d5fd0fa8..a8ed7414c9bc3 100644 --- a/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4BlockingPlugin.java +++ b/modules/transport-netty4/src/internalClusterTest/java/org/opensearch/transport/Netty4BlockingPlugin.java @@ -6,7 +6,7 @@ * compatible open source license. */ -package org.opensearch.http.netty4; +package org.opensearch.transport; import org.opensearch.common.network.NetworkService; import org.opensearch.common.settings.ClusterSettings; @@ -16,6 +16,7 @@ import org.opensearch.core.indices.breaker.CircuitBreakerService; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.http.HttpServerTransport; +import org.opensearch.http.netty4.Netty4HttpServerTransport; import org.opensearch.telemetry.tracing.Tracer; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.Netty4ModulePlugin; diff --git a/modules/transport-netty4/src/main/java/org/opensearch/transport/Netty4ModulePlugin.java b/modules/transport-netty4/src/main/java/org/opensearch/transport/Netty4ModulePlugin.java index fed4f7575b1e8..2bc795d11ed5d 100644 --- a/modules/transport-netty4/src/main/java/org/opensearch/transport/Netty4ModulePlugin.java +++ b/modules/transport-netty4/src/main/java/org/opensearch/transport/Netty4ModulePlugin.java @@ -144,7 +144,7 @@ public Map> getHttpTransports( ); } - protected SharedGroupFactory getSharedGroupFactory(Settings settings) { + SharedGroupFactory getSharedGroupFactory(Settings settings) { SharedGroupFactory groupFactory = this.groupFactory.get(); if (groupFactory != null) { assert groupFactory.getSettings().equals(settings) : "Different settings than originally provided"; diff --git a/server/src/main/java/org/opensearch/http/AbstractHttpServerTransport.java b/server/src/main/java/org/opensearch/http/AbstractHttpServerTransport.java index 7e847d04d30e3..398810d1ecccb 100644 --- a/server/src/main/java/org/opensearch/http/AbstractHttpServerTransport.java +++ b/server/src/main/java/org/opensearch/http/AbstractHttpServerTransport.java @@ -99,7 +99,7 @@ public abstract class AbstractHttpServerTransport extends AbstractLifecycleCompo protected final ThreadPool threadPool; protected final Dispatcher dispatcher; protected final CorsHandler corsHandler; - protected final NamedXContentRegistry xContentRegistry; + private final NamedXContentRegistry xContentRegistry; protected final PortsRange port; protected final ByteSizeValue maxContentLength; @@ -112,7 +112,7 @@ public abstract class AbstractHttpServerTransport extends AbstractLifecycleCompo private final Set httpServerChannels = Collections.newSetFromMap(new ConcurrentHashMap<>()); private final HttpTracer httpTracer; - protected final Tracer tracer; + private final Tracer tracer; protected AbstractHttpServerTransport( Settings settings,