Skip to content

Commit ec6ca97

Browse files
committed
Fix tests
1 parent ff1070d commit ec6ca97

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

core/src/test/java/org/springframework/security/core/parameters/AnnotationParameterNameDiscovererTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ public void getParameterNamesClassNoAnnotation() {
7878

7979
@Test
8080
public void getParameterNamesConstructor() throws Exception {
81-
assertThat(discoverer.getParameterNames(Impl.class.getConstructor(String.class)))
81+
assertThat(discoverer.getParameterNames(Impl.class.getDeclaredConstructor(String.class)))
8282
.isEqualTo(new String[] { "id" });
8383
}
8484

8585
@Test
8686
public void getParameterNamesConstructorNoAnnotation() throws Exception {
87-
assertThat(discoverer.getParameterNames(Impl.class.getConstructor(Long.class)))
87+
assertThat(discoverer.getParameterNames(Impl.class.getDeclaredConstructor(Long.class)))
8888
.isNull();
8989
}
9090

messaging/src/test/java/org/springframework/security/messaging/context/AuthenticationPrincipalArgumentResolverTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ static class CustomUserPrincipal {
258258
public final String property = "property";
259259
}
260260

261-
static class CopyUserPrincipal {
261+
public static class CopyUserPrincipal {
262262
public final String property;
263263

264-
CopyUserPrincipal(String property) {
264+
public CopyUserPrincipal(String property) {
265265
this.property = property;
266266
}
267267

268-
CopyUserPrincipal(CopyUserPrincipal toCopy) {
268+
public CopyUserPrincipal(CopyUserPrincipal toCopy) {
269269
this.property = toCopy.property;
270270
}
271271

web/src/test/java/org/springframework/security/web/method/annotation/AuthenticationPrincipalArgumentResolverTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@ static class CustomUserPrincipal {
264264
public final String property = "property";
265265
}
266266

267-
static class CopyUserPrincipal {
267+
public static class CopyUserPrincipal {
268268
public final String property;
269269

270-
CopyUserPrincipal(String property) {
270+
public CopyUserPrincipal(String property) {
271271
this.property = property;
272272
}
273273

274-
CopyUserPrincipal(CopyUserPrincipal toCopy) {
274+
public CopyUserPrincipal(CopyUserPrincipal toCopy) {
275275
this.property = toCopy.property;
276276
}
277277

0 commit comments

Comments
 (0)