diff --git a/core/src/test/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscovererTests.java b/core/src/test/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscovererTests.java index 5f5834b748..e3b5cf5891 100644 --- a/core/src/test/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscovererTests.java +++ b/core/src/test/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscovererTests.java @@ -78,13 +78,13 @@ public class AnnotationParameterNameDiscovererTests { @Test public void getParameterNamesConstructor() throws Exception { - assertThat(discoverer.getParameterNames(Impl.class.getConstructor(String.class))) + assertThat(discoverer.getParameterNames(Impl.class.getDeclaredConstructor(String.class))) .isEqualTo(new String[] { "id" }); } @Test public void getParameterNamesConstructorNoAnnotation() throws Exception { - assertThat(discoverer.getParameterNames(Impl.class.getConstructor(Long.class))) + assertThat(discoverer.getParameterNames(Impl.class.getDeclaredConstructor(Long.class))) .isNull(); } diff --git a/messaging/src/test/java/org/springframework/security/messaging/context/AuthenticationPrincipalArgumentResolverTests.java b/messaging/src/test/java/org/springframework/security/messaging/context/AuthenticationPrincipalArgumentResolverTests.java index baf5707b05..a9c8dea4df 100644 --- a/messaging/src/test/java/org/springframework/security/messaging/context/AuthenticationPrincipalArgumentResolverTests.java +++ b/messaging/src/test/java/org/springframework/security/messaging/context/AuthenticationPrincipalArgumentResolverTests.java @@ -258,14 +258,14 @@ public class AuthenticationPrincipalArgumentResolverTests { public final String property = "property"; } - static class CopyUserPrincipal { + public static class CopyUserPrincipal { public final String property; - CopyUserPrincipal(String property) { + public CopyUserPrincipal(String property) { this.property = property; } - CopyUserPrincipal(CopyUserPrincipal toCopy) { + public CopyUserPrincipal(CopyUserPrincipal toCopy) { this.property = toCopy.property; } diff --git a/web/src/test/java/org/springframework/security/web/method/annotation/AuthenticationPrincipalArgumentResolverTests.java b/web/src/test/java/org/springframework/security/web/method/annotation/AuthenticationPrincipalArgumentResolverTests.java index 9a4ac218c4..7255c83c1a 100644 --- a/web/src/test/java/org/springframework/security/web/method/annotation/AuthenticationPrincipalArgumentResolverTests.java +++ b/web/src/test/java/org/springframework/security/web/method/annotation/AuthenticationPrincipalArgumentResolverTests.java @@ -264,14 +264,14 @@ public class AuthenticationPrincipalArgumentResolverTests { public final String property = "property"; } - static class CopyUserPrincipal { + public static class CopyUserPrincipal { public final String property; - CopyUserPrincipal(String property) { + public CopyUserPrincipal(String property) { this.property = property; } - CopyUserPrincipal(CopyUserPrincipal toCopy) { + public CopyUserPrincipal(CopyUserPrincipal toCopy) { this.property = toCopy.property; }