From 72b42986700540c0b79b3d0c28c66b29dde38bd2 Mon Sep 17 00:00:00 2001 From: Nikolaj Volgushev Date: Tue, 10 Dec 2024 17:47:20 +0100 Subject: [PATCH] Nits --- .../elasticsearch/xpack/core/security/authz/RoleDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java index 6dc2b7c5c64bd..ae92a09b27fc7 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/RoleDescriptor.java @@ -788,7 +788,7 @@ public static RoleDescriptor.IndicesPrivileges[] parseIndices( while (parser.nextToken() != XContentParser.Token.END_ARRAY) { privileges.add(parseIndex(roleName, parser, allow2xFormat, allowLegacyFieldSecurityExceptFields)); } - return privileges.toArray(new IndicesPrivileges[privileges.size()]); + return privileges.toArray(new IndicesPrivileges[0]); } private static IndicesPrivileges parseIndex(