Update to Java 8 compatibility

* Spring IO Athens-BUILD-SNAPSHOT -> Cairo-BUILD-SNAPSHOT
* CGLib 3.1 -> 3.2.5 latest release Issue related to ASM https://github.com/cglib/cglib/issues/20
* AssertJ 2.2.0 -> 3.6.2 latest release
* PowerMock 1.6.2 -> 1.6.5 latest release is 1.6.6 but has regression Issue https://github.com/powermock/powermock/issues/717
* Update maven-compiler-plugin source/target to 1.8
This commit is contained in:
Joe Grandja 2017-03-20 15:38:03 -04:00
parent 8a05548dcb
commit 2b81983f7c
4 changed files with 24 additions and 18 deletions

View File

@ -15,11 +15,11 @@
*/
package org.springframework.security.core;
import org.junit.Test;
import java.io.DataInputStream;
import java.io.InputStream;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class JavaVersionTests {
private static final int JDK6_CLASS_VERSION = 50;
private static final int JDK8_CLASS_VERSION = 52;
@Test
public void authenticationCorrectJdkCompatibility() throws Exception {
@ -45,7 +45,7 @@ public class JavaVersionTests {
data.readInt();
data.readShort(); // minor
int major = data.readShort();
assertThat(major).isEqualTo(JDK6_CLASS_VERSION);
assertThat(major).isEqualTo(JDK8_CLASS_VERSION);
}
finally {
try {

View File

@ -5,13 +5,13 @@ apply plugin: 'javadocHotfix'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext.apacheDsVersion = '1.5.5'
ext.aspectjVersion = '1.8.4'
ext.casClientVersion = '3.4.1'
ext.cglibVersion = '3.1'
ext.cglibVersion = '3.2.5'
ext.commonsCodecVersion = '1.10'
ext.commonsCollectionsVersion = '3.2.2'
ext.commonsLoggingVersion = '1.2'
@ -27,7 +27,7 @@ ext.jettyVersion = '6.1.26'
ext.jstlVersion = '1.2.1'
ext.junitVersion = '4.12'
ext.logbackVersion = '1.1.2'
ext.powerMockVersion = '1.6.2'
ext.powerMockVersion = '1.6.5'
ext.seleniumVersion = '2.44.0'
ext.servletApiVersion = '3.1.0'
ext.slf4jVersion = '1.7.7'
@ -41,6 +41,7 @@ ext.thymeleafVersion = '3.0.2.RELEASE'
ext.jsonassertVersion = '1.3.0'
ext.validationApiVersion = '1.1.0.Final'
ext.spockDependencies = [
dependencies.create("org.spockframework:spock-spring:$spockVersion") {
exclude group: 'junit', module: 'junit-dep'
@ -148,7 +149,7 @@ dependencies {
testCompile "junit:junit:$junitVersion",
'org.mockito:mockito-core:1.10.19',
"org.springframework:spring-test:$springVersion",
'org.assertj:assertj-core:2.2.0'
'org.assertj:assertj-core:3.6.2'
// Use slf4j/logback for logging
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion",

View File

@ -67,7 +67,12 @@ def customizePom(pom, gradleProject) {
developer {
id = 'rwinch'
name = 'Rob Winch'
email = 'rwinch@gopivotal.com'
email = 'rwinch@pivotal.io'
}
developer {
id = 'jgrandja'
name = 'Joe Grandja'
email = 'jgrandja@pivotal.io'
}
}
@ -113,8 +118,8 @@ def customizePom(pom, gradleProject) {
.appendNode('plugin')
.appendNode('artifactId','maven-compiler-plugin').parent()
.appendNode('configuration')
.appendNode('source','1.7').parent()
.appendNode('target','1.7')
.appendNode('source','1.8').parent()
.appendNode('target','1.8')
if(isWar) {
plugins
.appendNode('plugin')

View File

@ -331,9 +331,9 @@ public class SecurityContextHolderAwareRequestFilterTests {
DelegatingSecurityContextRunnable wrappedRunnable = (DelegatingSecurityContextRunnable) runnableCaptor
.getValue();
assertThat(
WhiteboxImpl.getInternalState(wrappedRunnable, "delegateSecurityContext"))
WhiteboxImpl.<SecurityContext>getInternalState(wrappedRunnable, "delegateSecurityContext"))
.isEqualTo(context);
assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegate"))
assertThat(WhiteboxImpl.<SecurityContext>getInternalState(wrappedRunnable, "delegate"))
.isEqualTo(runnable);
}
@ -361,9 +361,9 @@ public class SecurityContextHolderAwareRequestFilterTests {
DelegatingSecurityContextRunnable wrappedRunnable = (DelegatingSecurityContextRunnable) runnableCaptor
.getValue();
assertThat(
WhiteboxImpl.getInternalState(wrappedRunnable, "delegateSecurityContext"))
WhiteboxImpl.<SecurityContext>getInternalState(wrappedRunnable, "delegateSecurityContext"))
.isEqualTo(context);
assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegate"))
assertThat(WhiteboxImpl.<SecurityContext>getInternalState(wrappedRunnable, "delegate"))
.isEqualTo(runnable);
}
@ -392,9 +392,9 @@ public class SecurityContextHolderAwareRequestFilterTests {
DelegatingSecurityContextRunnable wrappedRunnable = (DelegatingSecurityContextRunnable) runnableCaptor
.getValue();
assertThat(
WhiteboxImpl.getInternalState(wrappedRunnable, "delegateSecurityContext"))
WhiteboxImpl.<SecurityContext>getInternalState(wrappedRunnable, "delegateSecurityContext"))
.isEqualTo(context);
assertThat(WhiteboxImpl.getInternalState(wrappedRunnable, "delegate"))
assertThat(WhiteboxImpl.<SecurityContext>getInternalState(wrappedRunnable, "delegate"))
.isEqualTo(runnable);
}