File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
libs/logstash-bridge/src/main/java/org/elasticsearch/logstashbridge/env Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change 1717/**
1818 * An external bridge for {@link Environment}
1919 */
20- public class EnvironmentBridge extends StableBridgeAPI . ProxyInternal <Environment > {
21- public static EnvironmentBridge fromInternal (final Environment delegate ) {
22- return new EnvironmentBridge (delegate );
20+ public interface EnvironmentBridge extends StableBridgeAPI <Environment > {
21+ static EnvironmentBridge fromInternal (final Environment delegate ) {
22+ return new EnvironmentBridge . ProxyInternal (delegate );
2323 }
2424
25- public EnvironmentBridge (final SettingsBridge settingsBridge , final Path configPath ) {
26- this (new Environment (settingsBridge .toInternal (), configPath ));
25+ static EnvironmentBridge create (final SettingsBridge bridgedSettings , final Path configPath ) {
26+ return fromInternal (new Environment (bridgedSettings .toInternal (), configPath ));
2727 }
2828
29- private EnvironmentBridge (final Environment delegate ) {
30- super (delegate );
31- }
29+ class ProxyInternal extends StableBridgeAPI .ProxyInternal <Environment > implements EnvironmentBridge {
30+ private ProxyInternal (final Environment delegate ) {
31+ super (delegate );
32+ }
3233
33- @ Override
34- public Environment toInternal () {
35- return this .internalDelegate ;
34+ @ Override
35+ public Environment toInternal () {
36+ return this .internalDelegate ;
37+ }
3638 }
3739}
You can’t perform that action at this time.
0 commit comments