Skip to content

Commit 39d08ad

Browse files
committed
Making variables final
1 parent 154d305 commit 39d08ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public void testKibanaSystemRole() {
223223
});
224224

225225
// Beats management index
226-
String index = ".management-beats";
226+
final String index = ".management-beats";
227227
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(index), is(false));
228228
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:bar").test(index), is(false));
229229
assertThat(kibanaRole.indices().allowedIndicesMatcher(DeleteIndexAction.NAME).test(index), is(false));
@@ -494,11 +494,11 @@ public void testLogstashSystemRole() {
494494
}
495495

496496
public void testBeatsAdminRole() {
497-
RoleDescriptor roleDescriptor = new ReservedRolesStore().roleDescriptor("beats_admin");
497+
final RoleDescriptor roleDescriptor = new ReservedRolesStore().roleDescriptor("beats_admin");
498498
assertNotNull(roleDescriptor);
499499
assertThat(roleDescriptor.getMetadata(), hasEntry("_reserved", true));
500500

501-
Role beatsAdminRole = Role.builder(roleDescriptor, null).build();
501+
final Role beatsAdminRole = Role.builder(roleDescriptor, null).build();
502502
assertThat(beatsAdminRole.cluster().check(ClusterHealthAction.NAME), is(false));
503503
assertThat(beatsAdminRole.cluster().check(ClusterStateAction.NAME), is(false));
504504
assertThat(beatsAdminRole.cluster().check(ClusterStatsAction.NAME), is(false));
@@ -512,7 +512,7 @@ public void testBeatsAdminRole() {
512512
assertThat(beatsAdminRole.indices().allowedIndicesMatcher("indices:foo").test(randomAlphaOfLengthBetween(8, 24)),
513513
is(false));
514514

515-
String index = ".management-beats";
515+
final String index = ".management-beats";
516516
logger.info("index name [{}]", index);
517517
assertThat(beatsAdminRole.indices().allowedIndicesMatcher("indices:foo").test(index), is(true));
518518
assertThat(beatsAdminRole.indices().allowedIndicesMatcher("indices:bar").test(index), is(true));

0 commit comments

Comments
 (0)