Make AuthorizationProxyFactory#proxy Generic

Closes gh-16706

Signed-off-by: dae won <eodnjs01477@gmail.com>
This commit is contained in:
dae won
2025-04-25 20:13:56 +09:00
committed by Josh Cummings
parent f4b8e2421a
commit 8612e952fe
6 changed files with 17 additions and 15 deletions

View File

@@ -335,7 +335,7 @@ public class AuthorizationAdvisorProxyFactoryTests {
@Test
public void setTargetVisitorIgnoreValueTypesThenIgnores() {
AuthorizationAdvisorProxyFactory factory = AuthorizationAdvisorProxyFactory.withDefaults();
assertThatExceptionOfType(ClassCastException.class).isThrownBy(() -> ((Integer) factory.proxy(35)).intValue());
assertThatExceptionOfType(ClassCastException.class).isThrownBy(() -> factory.proxy(35).intValue());
factory.setTargetVisitor(TargetVisitor.defaultsSkipValueTypes());
assertThat(factory.proxy(35)).isEqualTo(35);
}