Skip to content

Commit 05ef215

Browse files
committed
Align Formatting
Issue gh-13132
1 parent 9669747 commit 05ef215

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

core/src/main/java/org/springframework/security/authorization/method/AuthorizationAnnotationUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1+
/*
2+
* Copyright 2002-2023 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package org.springframework.security.authorization.method;
218

319
import java.lang.reflect.Method;
420
import java.lang.reflect.Proxy;
521
import java.util.List;
622

723
import org.junit.jupiter.api.Test;
24+
825
import org.springframework.security.access.prepost.PreAuthorize;
926

1027
import static org.assertj.core.api.Assertions.assertThatNoException;
@@ -15,11 +32,10 @@
1532
class AuthorizationAnnotationUtilsTests {
1633

1734
@Test // gh-13132
18-
public void annotationsOnSyntheticMethodsShouldNotTriggerAnnotationConfigurationException()
19-
throws NoSuchMethodException {
20-
StringRepository proxy =
21-
(StringRepository) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
22-
new Class[] {StringRepository.class}, (p, m, args) -> null);
35+
void annotationsOnSyntheticMethodsShouldNotTriggerAnnotationConfigurationException() throws NoSuchMethodException {
36+
StringRepository proxy = (StringRepository) Proxy.newProxyInstance(
37+
Thread.currentThread().getContextClassLoader(), new Class[] { StringRepository.class },
38+
(p, m, args) -> null);
2339
Method method = proxy.getClass().getDeclaredMethod("findAll");
2440
assertThatNoException()
2541
.isThrownBy(() -> AuthorizationAnnotationUtils.findUniqueAnnotation(method, PreAuthorize.class));
@@ -28,12 +44,15 @@ public void annotationsOnSyntheticMethodsShouldNotTriggerAnnotationConfiguration
2844
private interface BaseRepository<T> {
2945

3046
Iterable<T> findAll();
47+
3148
}
3249

3350
private interface StringRepository extends BaseRepository<String> {
3451

3552
@Override
3653
@PreAuthorize("hasRole('someRole')")
3754
List<String> findAll();
55+
3856
}
57+
3958
}

0 commit comments

Comments
 (0)