From 63793499bdce1d2f6290d843efd9bfc4bd3809d4 Mon Sep 17 00:00:00 2001 From: Dimitrios Liappis Date: Tue, 15 Jan 2019 19:57:24 +0200 Subject: [PATCH] Fix line length for `node` and remove suppresion (#37454) Relates #34884 --- .../main/resources/checkstyle_suppressions.xml | 1 - .../main/java/org/elasticsearch/node/Node.java | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/buildSrc/src/main/resources/checkstyle_suppressions.xml b/buildSrc/src/main/resources/checkstyle_suppressions.xml index 3da6c32db995c..e2aab6b82d35a 100644 --- a/buildSrc/src/main/resources/checkstyle_suppressions.xml +++ b/buildSrc/src/main/resources/checkstyle_suppressions.xml @@ -48,7 +48,6 @@ - diff --git a/server/src/main/java/org/elasticsearch/node/Node.java b/server/src/main/java/org/elasticsearch/node/Node.java index cf564ebb6d898..dfc538c23260f 100644 --- a/server/src/main/java/org/elasticsearch/node/Node.java +++ b/server/src/main/java/org/elasticsearch/node/Node.java @@ -300,7 +300,8 @@ protected Node( environment.configFile(), Arrays.toString(environment.dataFiles()), environment.logsFile(), environment.pluginsFile()); } - this.pluginsService = new PluginsService(tmpSettings, environment.configFile(), environment.modulesFile(), environment.pluginsFile(), classpathPlugins); + this.pluginsService = new PluginsService(tmpSettings, environment.configFile(), environment.modulesFile(), + environment.pluginsFile(), classpathPlugins); this.settings = pluginsService.updatedSettings(); localNodeFactory = new LocalNodeFactory(settings, nodeEnvironment.nodeId()); @@ -669,11 +670,9 @@ public Node start() throws NodeValidationException { onDiskMetadata = MetaData.EMPTY_META_DATA; } assert onDiskMetadata != null : "metadata is null but shouldn't"; // this is never null - validateNodeBeforeAcceptingRequests(new BootstrapContext(environment, onDiskMetadata), transportService.boundAddress(), pluginsService - .filterPlugins(Plugin - .class) - .stream() - .flatMap(p -> p.getBootstrapChecks().stream()).collect(Collectors.toList())); + validateNodeBeforeAcceptingRequests(new BootstrapContext(environment, onDiskMetadata), transportService.boundAddress(), + pluginsService.filterPlugins(Plugin.class).stream() + .flatMap(p -> p.getBootstrapChecks().stream()).collect(Collectors.toList())); clusterService.addStateApplier(transportService.getTaskManager()); // start after transport service so the local disco is known @@ -767,8 +766,9 @@ private Node stop() { } // During concurrent close() calls we want to make sure that all of them return after the node has completed it's shutdown cycle. - // If not, the hook that is added in Bootstrap#setup() will be useless: close() might not be executed, in case another (for example api) call - // to close() has already set some lifecycles to stopped. In this case the process will be terminated even if the first call to close() has not finished yet. + // If not, the hook that is added in Bootstrap#setup() will be useless: + // close() might not be executed, in case another (for example api) call to close() has already set some lifecycles to stopped. + // In this case the process will be terminated even if the first call to close() has not finished yet. @Override public synchronized void close() throws IOException { if (lifecycle.started()) {