Downgrade to AspectJ 1.8.9 and merge EhCache 3 tests into spring-context-support

Includes latest applicable updates (Jackson 2.8.10, OkHttp 3.8.1, Undertow 1.3.31, Netty 4.1.15)

Issue: SPR-15836
Issue: SPR-15880
This commit is contained in:
Juergen Hoeller
2017-09-08 19:41:27 +02:00
parent 9dcdfec2e2
commit fa2c377405
5 changed files with 16 additions and 17 deletions

View File

@@ -0,0 +1,35 @@
/*
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cache.jcache;
import javax.cache.Caching;
import javax.cache.spi.CachingProvider;
/**
* Just here to be run against EHCache 3, whereas the original JCacheEhCacheAnnotationTests
* runs against EhCache 2.x with the EhCache-JCache add-on.
*
* @author Juergen Hoeller
*/
public class JCacheEhCache3AnnotationTests extends JCacheEhCacheAnnotationTests {
@Override
protected CachingProvider getCachingProvider() {
return Caching.getCachingProvider("org.ehcache.jsr107.EhcacheCachingProvider");
}
}

View File

@@ -0,0 +1,35 @@
/*
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cache.jcache;
import javax.cache.Caching;
import javax.cache.spi.CachingProvider;
/**
* Just here to be run against EHCache 3, whereas the original JCacheEhCacheAnnotationTests
* runs against EhCache 2.x with the EhCache-JCache add-on.
*
* @author Stephane Nicoll
*/
public class JCacheEhCache3ApiTests extends JCacheEhCacheApiTests {
@Override
protected CachingProvider getCachingProvider() {
return Caching.getCachingProvider("org.ehcache.jsr107.EhcacheCachingProvider");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
package org.springframework.cache.jcache;
import javax.annotation.Resource;
import javax.cache.CacheManager;
import javax.cache.Caching;
import javax.cache.configuration.MutableConfiguration;
@@ -26,6 +25,7 @@ import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.config.AbstractCacheAnnotationTests;
@@ -59,7 +59,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
}
protected CachingProvider getCachingProvider() {
return Caching.getCachingProvider();
return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider");
}
@After
@@ -81,7 +81,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
@EnableCaching
static class EnableCachingConfig extends CachingConfigurerSupport {
@Resource
@Autowired
CachingProvider cachingProvider;
@Override
@@ -93,7 +93,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
@Bean
public CacheManager jCacheManager() {
CacheManager cacheManager = this.cachingProvider.getCacheManager();
MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<Object, Object>();
MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<>();
mutableConfiguration.setStoreByValue(false); // otherwise value has to be Serializable
cacheManager.createCache("testCache", mutableConfiguration);
cacheManager.createCache("primary", mutableConfiguration);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@ public class JCacheEhCacheApiTests extends AbstractCacheTests<JCacheCache> {
}
protected CachingProvider getCachingProvider() {
return Caching.getCachingProvider();
return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider");
}
@After
@@ -58,7 +58,6 @@ public class JCacheEhCacheApiTests extends AbstractCacheTests<JCacheCache> {
}
}
@Override
protected JCacheCache getCache() {
return this.cache;