Remove deprecated MemberCategory#DECLARED_FIELDS
Issue gh-16889 Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
committed by
Josh Cummings
parent
88369cd252
commit
8e2067bb3e
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,12 +58,12 @@ class WebTestUtilsRuntimeHints implements RuntimeHintsRegistrar {
|
||||
}
|
||||
|
||||
private void registerCsrfTokenRepositoryHints(RuntimeHints hints) {
|
||||
hints.reflection().registerType(CsrfFilter.class, MemberCategory.DECLARED_FIELDS);
|
||||
hints.reflection().registerType(CsrfFilter.class, MemberCategory.ACCESS_DECLARED_FIELDS);
|
||||
}
|
||||
|
||||
private void registerSecurityContextRepositoryHints(RuntimeHints hints) {
|
||||
hints.reflection().registerType(SecurityContextPersistenceFilter.class, MemberCategory.DECLARED_FIELDS);
|
||||
hints.reflection().registerType(SecurityContextHolderFilter.class, MemberCategory.DECLARED_FIELDS);
|
||||
hints.reflection().registerType(SecurityContextPersistenceFilter.class, MemberCategory.ACCESS_DECLARED_FIELDS);
|
||||
hints.reflection().registerType(SecurityContextHolderFilter.class, MemberCategory.ACCESS_DECLARED_FIELDS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
* Copyright 2002-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -72,21 +72,21 @@ class WebTestUtilsRuntimeHintsTests {
|
||||
void csrfFilterHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection()
|
||||
.onType(CsrfFilter.class)
|
||||
.withMemberCategories(MemberCategory.DECLARED_FIELDS)).accepts(this.hints);
|
||||
.withMemberCategories(MemberCategory.ACCESS_DECLARED_FIELDS)).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void securityContextPersistenceFilterHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection()
|
||||
.onType(SecurityContextPersistenceFilter.class)
|
||||
.withMemberCategories(MemberCategory.DECLARED_FIELDS)).accepts(this.hints);
|
||||
.withMemberCategories(MemberCategory.ACCESS_DECLARED_FIELDS)).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void securityContextHolderFilterHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection()
|
||||
.onType(SecurityContextHolderFilter.class)
|
||||
.withMemberCategories(MemberCategory.DECLARED_FIELDS)).accepts(this.hints);
|
||||
.withMemberCategories(MemberCategory.ACCESS_DECLARED_FIELDS)).accepts(this.hints);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user