Skip to content

Commit 21f1218

Browse files
committed
Rm nullable annotations
1 parent 2931c85 commit 21f1218

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/permission/IndicesPermission.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public boolean test(IndexAbstraction indexAbstraction) {
240240
* The resource must exist. Otherwise, use the {@link #test(String, IndexAbstraction, IndexComponentSelector)} method.
241241
* Returns {@code true} if access to the given resource is authorized or {@code false} otherwise.
242242
*/
243-
public boolean test(IndexAbstraction indexAbstraction, @Nullable IndexComponentSelector selector) {
243+
public boolean test(IndexAbstraction indexAbstraction, IndexComponentSelector selector) {
244244
return test(indexAbstraction.getName(), indexAbstraction, selector);
245245
}
246246

@@ -250,7 +250,7 @@ public boolean test(IndexAbstraction indexAbstraction, @Nullable IndexComponentS
250250
* if it doesn't.
251251
* Returns {@code true} if access to the given resource is authorized or {@code false} otherwise.
252252
*/
253-
public boolean test(String name, @Nullable IndexAbstraction indexAbstraction, @Nullable IndexComponentSelector selector) {
253+
public boolean test(String name, @Nullable IndexAbstraction indexAbstraction, IndexComponentSelector selector) {
254254
return IndexComponentSelector.FAILURES.equals(selector)
255255
? isAuthorizedForFailuresAccess.test(name, indexAbstraction)
256256
: isAuthorizedForDataAccess.test(name, indexAbstraction);

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/accesscontrol/IndicesPermissionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,10 +974,10 @@ public void testResourceAuthorizedPredicateForDatastreams() {
974974
);
975975
assertThat(predicate.test(dataStream), is(false));
976976
// test authorization for a missing resource with the datastream's name
977-
assertThat(predicate.test(dataStream.getName(), null, null), is(true));
977+
assertThat(predicate.test(dataStream.getName(), null, IndexComponentSelector.DATA), is(true));
978978
assertThat(predicate.test(backingIndex), is(false));
979979
// test authorization for a missing resource with the backing index's name
980-
assertThat(predicate.test(backingIndex.getName(), null, null), is(true));
980+
assertThat(predicate.test(backingIndex.getName(), null, IndexComponentSelector.DATA), is(true));
981981
assertThat(predicate.test(concreteIndex), is(true));
982982
assertThat(predicate.test(alias), is(true));
983983
}

0 commit comments

Comments
 (0)