From 0ab9e9a0c64a252fb8d8590bc302e82b8c8926c6 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sat, 14 Apr 2012 19:05:20 +0300 Subject: [PATCH] Upgrade AspectJ from 1.6.8 to 1.6.12 - Spring remains compatible against AJ version 1.6.8, but is now compiling and testing against 1.6.12 - Encountered what appears to be an AJ bug introduced in 1.6.10: an assertion in org.aspectj.weaver.UnresolvedType causes a false negative failure when encountering org.springframework.io.Resource arrays, e.g. "[org.springframework.io.Resource@xxx". This problem has been reported to the AJ team and in the meantime, the recommended workaround is to disable assertions either completely, or at least selectively with -disableassertions:org.aspectj.weaver.UnresolvedType Issue: SPR-7989, SPR-9272 --- build.gradle | 11 ++++++++--- src/dist/changelog.txt | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index e533a7fe26..936725963f 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,7 @@ configure(allprojects) { targetCompatibility=1.5 ext.slf4jLog4jVersion = '1.5.10' + ext.aspectjVersion = '1.6.12' [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none'] @@ -133,7 +134,7 @@ project('spring-core') { builtBy project(":spring-asm").jar } compile "commons-logging:commons-logging:1.1.1" - compile("org.aspectj:aspectjweaver:1.6.8", optional) + compile("org.aspectj:aspectjweaver:${aspectjVersion}", optional) compile("net.sf.jopt-simple:jopt-simple:3.0") { dep -> optional dep exclude group: 'org.apache.ant', module: 'ant' @@ -220,6 +221,10 @@ project('spring-context') { testCompile("javax.xml:jaxrpc-api:1.1") testCompile("javax.inject:com.springsource.org.atinject.tck:1.0.0") } + + test { + jvmArgs = ['-disableassertions:org.aspectj.weaver.UnresolvedType'] // SPR-7989 + } } project('spring-tx') { @@ -439,8 +444,8 @@ project('spring-aspects') { dependencies { compile project(":spring-orm") aspects project(":spring-orm") - ajc "org.aspectj:aspectjtools:1.6.8" - compile "org.aspectj:aspectjrt:1.6.8" + ajc "org.aspectj:aspectjtools:${aspectjVersion}" + compile "org.aspectj:aspectjrt:${aspectjVersion}" testCompile project(":spring-test") } eclipse.project { diff --git a/src/dist/changelog.txt b/src/dist/changelog.txt index 928e2f52a2..42257de507 100644 --- a/src/dist/changelog.txt +++ b/src/dist/changelog.txt @@ -5,6 +5,7 @@ http://www.springsource.org Changes in version 3.2 M1 ------------------------------------- +* upgraded to AspectJ 1.6.12 * better handling on failure to parse invalid 'Content-Type' or 'Accept' headers * handle a controller method's return value based on the actual returned value (vs declared type) * fix issue with combining identical controller and method level request mapping paths