提交 a1980264 编写于 作者: S Stephane Nicoll

fix CI build

Prior to this commit, AnnotatedJCacheableService contained an annotated
method demonstrating a failure scenario. This could break depending on
the order of the methods array as AopUtils creates the proxy if the
pointcut matches by checking each method.

On the CI server, the first method was this invalid use case so
checking if the proxy has to be created lead to an unexpected
exception. This scenario has been moved to its own private class now.
上级 7b5e9e8c
......@@ -177,12 +177,6 @@ public class AnnotatedJCacheableService implements JCacheableService<Long> {
public void noAnnotation() {
}
@CacheRemove
@CacheRemoveAll
public void multiAnnotations() {
}
@Override
public long exceptionInvocations() {
return exceptionCounter.get();
......
......@@ -25,6 +25,8 @@ import java.util.Comparator;
import javax.cache.annotation.CacheDefaults;
import javax.cache.annotation.CacheKeyGenerator;
import javax.cache.annotation.CacheRemove;
import javax.cache.annotation.CacheRemoveAll;
import javax.cache.annotation.CacheResult;
import org.junit.Before;
......@@ -105,7 +107,7 @@ public class AnnotationCacheOperationSourceTests extends AbstractJCacheTests {
@Test
public void multiAnnotations() {
thrown.expect(IllegalStateException.class);
getCacheOperation(AnnotatedJCacheableService.class, name.getMethodName());
getCacheOperation(InvalidCases.class, name.getMethodName());
}
@Test
......@@ -259,4 +261,12 @@ public class AnnotationCacheOperationSourceTests extends AbstractJCacheTests {
}
}
static class InvalidCases {
@CacheRemove
@CacheRemoveAll
public void multiAnnotations() {
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册