diff --git a/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java b/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java index c06c8d12fdc..45b36ee1a8c 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java @@ -69,7 +69,7 @@ final class BootstrapCheck { * @param checks the checks to execute */ // visible for testing - static void check(boolean enforceLimits, List checks) { + static void check(final boolean enforceLimits, final List checks) { final ESLogger logger = Loggers.getLogger(BootstrapCheck.class); for (Check check : checks) { @@ -114,7 +114,7 @@ final class BootstrapCheck { } // the list of checks to execute - private static List checks(Settings settings) { + private static List checks(final Settings settings) { List checks = new ArrayList<>(); FileDescriptorCheck fileDescriptorCheck = Constants.MAC_OS_X ? new OsXFileDescriptorCheck() : new FileDescriptorCheck(); @@ -165,7 +165,7 @@ final class BootstrapCheck { this(1 << 16); } - protected FileDescriptorCheck(int limit) { + protected FileDescriptorCheck(final int limit) { if (limit <= 0) { throw new IllegalArgumentException("limit must be positive but was [" + limit + "]"); } @@ -199,7 +199,7 @@ final class BootstrapCheck { private final boolean mlockallSet; - public MlockallCheck(boolean mlockAllSet) { + public MlockallCheck(final boolean mlockAllSet) { this.mlockallSet = mlockAllSet; } diff --git a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapCheckTests.java b/core/src/test/java/org/elasticsearch/bootstrap/BootstrapCheckTests.java index 000ae7b068f..4fbf43de9ac 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/BootstrapCheckTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/BootstrapCheckTests.java @@ -63,7 +63,7 @@ public class BootstrapCheckTests extends ESTestCase { try { BootstrapCheck.check(true, Collections.singletonList(check)); fail("should have failed due to max file descriptors too low"); - } catch (RuntimeException e) { + } catch (final RuntimeException e) { assertThat(e.getMessage(), containsString("max file descriptors")); } @@ -92,7 +92,7 @@ public class BootstrapCheckTests extends ESTestCase { private final boolean isMemoryLocked; private final boolean shouldFail; - public MlockallCheckTestCase(boolean mlockallSet, boolean isMemoryLocked, boolean shouldFail) { + public MlockallCheckTestCase(final boolean mlockallSet, final boolean isMemoryLocked, final boolean shouldFail) { this.mlockallSet = mlockallSet; this.isMemoryLocked = isMemoryLocked; this.shouldFail = shouldFail; @@ -118,7 +118,7 @@ public class BootstrapCheckTests extends ESTestCase { try { BootstrapCheck.check(true, Collections.singletonList(check)); fail("should have failed due to memory not being locked"); - } catch (RuntimeException e) { + } catch (final RuntimeException e) { assertThat( e.getMessage(), containsString("Memory locking requested for elasticsearch process but memory is not locked"));