Skip to content

Commit d4e4598

Browse files
committed
Fix SecuredAnnotationSecurityMetadataSourceTests -> Related SPR-16677
1 parent 526e0fd commit d4e4598

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

core/src/test/java/org/springframework/security/access/annotation/sec2150/MethodInvocationFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class MethodInvocationFactory {
3030
public static MockMethodInvocation createSec2150MethodInvocation()
3131
throws NoSuchMethodException {
3232
ProxyFactory factory = new ProxyFactory(new Class[] { PersonRepository.class });
33-
factory.setTargetClass(CrudRepository.class);
33+
factory.setTargetClass(PersonRepositoryImpl.class);
3434
PersonRepository repository = (PersonRepository) factory.getProxy();
3535
return new MockMethodInvocation(repository, PersonRepository.class, "findAll");
3636
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2002-2018 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+
* http://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+
package org.springframework.security.access.annotation.sec2150;
17+
18+
/**
19+
* @author Joe Grandja
20+
*/
21+
public class PersonRepositoryImpl implements PersonRepository {
22+
@Override
23+
public Iterable<Object> findAll() {
24+
return null;
25+
}
26+
}

0 commit comments

Comments
 (0)