From 9fb54f4ef8dce57fdf76aa80c075bb5fc29321d3 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 14 Nov 2016 13:49:16 -0500 Subject: [PATCH] Remove unnecessary hash map copy in o.e.b.Security This commit removes an unnecessary copying of the tribe node group settings in o.e.b.Security. --- core/src/main/java/org/elasticsearch/bootstrap/Security.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Security.java b/core/src/main/java/org/elasticsearch/bootstrap/Security.java index 8b5d0d42977..2b8fd325d81 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/Security.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/Security.java @@ -294,8 +294,7 @@ final class Security { } } - final Map tribeNodesSettings = new HashMap<>(settings.getGroups("tribe", true)); - for (final Settings tribeNodeSettings : tribeNodesSettings.values()) { + for (final Settings tribeNodeSettings : settings.getGroups("tribe", true).values()) { // tribe nodes have HTTP disabled by default, so we check if HTTP is enabled before granting if (NetworkModule.HTTP_ENABLED.exists(tribeNodeSettings) && NetworkModule.HTTP_ENABLED.get(tribeNodeSettings)) { addSocketPermissionForHttp(policy, tribeNodeSettings);