Skip to content

Commit fa2c377

Browse files
committed
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
1 parent 9dcdfec commit fa2c377

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ configure(allprojects) { project ->
3131
group = "org.springframework"
3232
version = qualifyVersionIfNecessary(version)
3333

34-
ext.aspectjVersion = "1.8.10"
34+
ext.aspectjVersion = "1.8.9"
3535
ext.caffeineVersion = "2.3.5"
3636
ext.eclipselinkVersion = "2.4.2"
3737
ext.ehcacheVersion = "2.10.4"
@@ -52,7 +52,7 @@ configure(allprojects) { project ->
5252
ext.hsqldbVersion = "2.3.4"
5353
ext.httpasyncVersion = "4.1.3"
5454
ext.httpclientVersion = "4.5.3"
55-
ext.jackson2Version = "2.8.9"
55+
ext.jackson2Version = "2.8.10"
5656
ext.jasperreportsVersion = "6.2.1" // our tests fail with JR-internal NPEs against 6.2.2 and higher
5757
ext.javamailVersion = "1.5.6"
5858
ext.jettyVersion = "9.3.14.v20161028" // as of 9.3.15, Jetty has hard Servlet 3.1 requirement
@@ -62,9 +62,9 @@ configure(allprojects) { project ->
6262
ext.jtaVersion = "1.2"
6363
ext.junitVersion = "4.12"
6464
ext.log4jVersion = "1.2.17"
65-
ext.nettyVersion = "4.1.13.Final"
65+
ext.nettyVersion = "4.1.15.Final"
6666
ext.okhttpVersion = "2.7.5"
67-
ext.okhttp3Version = "3.7.0"
67+
ext.okhttp3Version = "3.8.1"
6868
ext.openjpaVersion = "2.4.1"
6969
ext.poiVersion = "3.14"
7070
ext.reactorVersion = "2.0.8.RELEASE"
@@ -77,7 +77,7 @@ configure(allprojects) { project ->
7777
ext.tiles3Version = "3.0.7"
7878
ext.tomcatVersion = "8.5.16"
7979
ext.tyrusVersion = "1.3.5" // constrained by WebLogic 12.1.3 support
80-
ext.undertowVersion = "1.3.30.Final"
80+
ext.undertowVersion = "1.3.31.Final"
8181
ext.xmlunitVersion = "1.6"
8282
ext.xstreamVersion = "1.4.9"
8383

@@ -658,6 +658,8 @@ project("spring-context-support") {
658658
testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
659659
testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
660660
testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}")
661+
testRuntime("org.ehcache:ehcache:${ehcache3Version}")
662+
testRuntime("org.terracotta:management-model:2.3.0")
661663
}
662664
}
663665

@@ -1034,8 +1036,6 @@ project("spring-test") {
10341036
testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
10351037
testCompile("javax.cache:cache-api:1.0.0")
10361038
testRuntime("log4j:log4j:${log4jVersion}")
1037-
testRuntime("org.ehcache:ehcache:${ehcache3Version}")
1038-
testRuntime("org.terracotta:management-model:2.3.0")
10391039
}
10401040

10411041
task testNG(type: Test) {

spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3AnnotationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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.

spring-test/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCache3ApiTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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.

spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.cache.jcache;
1818

19-
import javax.annotation.Resource;
2019
import javax.cache.CacheManager;
2120
import javax.cache.Caching;
2221
import javax.cache.configuration.MutableConfiguration;
@@ -26,6 +25,7 @@
2625
import org.junit.Ignore;
2726
import org.junit.Test;
2827

28+
import org.springframework.beans.factory.annotation.Autowired;
2929
import org.springframework.cache.annotation.CachingConfigurerSupport;
3030
import org.springframework.cache.annotation.EnableCaching;
3131
import org.springframework.cache.config.AbstractCacheAnnotationTests;
@@ -59,7 +59,7 @@ protected ConfigurableApplicationContext getApplicationContext() {
5959
}
6060

6161
protected CachingProvider getCachingProvider() {
62-
return Caching.getCachingProvider();
62+
return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider");
6363
}
6464

6565
@After
@@ -81,7 +81,7 @@ public void testCustomCacheManager() {
8181
@EnableCaching
8282
static class EnableCachingConfig extends CachingConfigurerSupport {
8383

84-
@Resource
84+
@Autowired
8585
CachingProvider cachingProvider;
8686

8787
@Override
@@ -93,7 +93,7 @@ public org.springframework.cache.CacheManager cacheManager() {
9393
@Bean
9494
public CacheManager jCacheManager() {
9595
CacheManager cacheManager = this.cachingProvider.getCacheManager();
96-
MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<Object, Object>();
96+
MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<>();
9797
mutableConfiguration.setStoreByValue(false); // otherwise value has to be Serializable
9898
cacheManager.createCache("testCache", mutableConfiguration);
9999
cacheManager.createCache("primary", mutableConfiguration);

spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -48,7 +48,7 @@ public void setup() {
4848
}
4949

5050
protected CachingProvider getCachingProvider() {
51-
return Caching.getCachingProvider();
51+
return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider");
5252
}
5353

5454
@After
@@ -58,7 +58,6 @@ public void shutdown() {
5858
}
5959
}
6060

61-
6261
@Override
6362
protected JCacheCache getCache() {
6463
return this.cache;

0 commit comments

Comments
 (0)