From 9882a53c7dc26990e0a504be2116c2aec9e11684 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Wed, 25 Nov 2015 22:05:57 +0100 Subject: [PATCH] Fix test failure --- .../cache/config/AnnotatedClassCacheableService.java | 5 +++-- .../cache/config/DefaultCacheableService.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java index 9426acc8aae..224f7ffa955 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java @@ -16,6 +16,7 @@ package org.springframework.cache.config; +import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; import org.springframework.cache.annotation.CacheEvict; @@ -159,12 +160,12 @@ public class AnnotatedClassCacheableService implements CacheableService @Override public Long throwChecked(Object arg1) throws Exception { - throw new UnsupportedOperationException(arg1.toString()); + throw new IOException(arg1.toString()); } @Override public Long throwUnchecked(Object arg1) { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException(arg1.toString()); } // multi annotations diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java index aeebd53c575..c2c923f531c 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java @@ -16,6 +16,7 @@ package org.springframework.cache.config; +import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; import org.springframework.cache.annotation.CacheEvict; @@ -166,7 +167,7 @@ public class DefaultCacheableService implements CacheableService { @Override @Cacheable("testCache") public Long throwChecked(Object arg1) throws Exception { - throw new Exception(arg1.toString()); + throw new IOException(arg1.toString()); } @Override