diff --git a/build.gradle b/build.gradle index ea74d840f5..ed7b608102 100644 --- a/build.gradle +++ b/build.gradle @@ -27,8 +27,8 @@ allprojects { ext.releaseBuild = version.endsWith('RELEASE') ext.snapshotBuild = version.endsWith('SNAPSHOT') - ext.springVersion = '4.3.2.RELEASE' - ext.springLdapVersion = '2.0.2.RELEASE' + ext.springVersion = '4.3.3.RELEASE' + ext.springLdapVersion = '2.2.0.RC1' group = 'org.springframework.security' diff --git a/config/config.gradle b/config/config.gradle index f43d595e10..56be46286c 100644 --- a/config/config.gradle +++ b/config/config.gradle @@ -39,8 +39,8 @@ dependencies { "org.springframework:spring-orm:$springVersion", "org.springframework:spring-tx:$springVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", - "org.eclipse.persistence:javax.persistence:2.0.5", - "org.hibernate:hibernate-entitymanager:4.1.0.Final", + "org.eclipse.persistence:javax.persistence:$javaPersistenceVersion", + "org.hibernate:hibernate-entitymanager:$hibernateVersion", "org.codehaus.groovy:groovy-all:$groovyVersion", "org.apache.directory.server:apacheds-core:$apacheDsVersion", "org.apache.directory.server:apacheds-core-entry:$apacheDsVersion", @@ -50,7 +50,6 @@ dependencies { 'org.apache.directory.shared:shared-ldap:0.9.15', 'ldapsdk:ldapsdk:4.1', powerMockDependencies, - "org.hibernate:hibernate-entitymanager:3.6.10.Final", "org.hsqldb:hsqldb:$hsqlVersion", spockDependencies diff --git a/core/src/main/java/org/springframework/security/core/SpringSecurityCoreVersion.java b/core/src/main/java/org/springframework/security/core/SpringSecurityCoreVersion.java index e598aceec4..c3f8d25a9c 100644 --- a/core/src/main/java/org/springframework/security/core/SpringSecurityCoreVersion.java +++ b/core/src/main/java/org/springframework/security/core/SpringSecurityCoreVersion.java @@ -40,7 +40,7 @@ public class SpringSecurityCoreVersion { */ public static final long SERIAL_VERSION_UID = 420L; - static final String MIN_SPRING_VERSION = "4.3.2.RELEASE"; + static final String MIN_SPRING_VERSION = "4.3.3.RELEASE"; static { performVersionChecks(); diff --git a/gradle/javaprojects.gradle b/gradle/javaprojects.gradle index eff3a10b83..2bbc53b0da 100644 --- a/gradle/javaprojects.gradle +++ b/gradle/javaprojects.gradle @@ -19,14 +19,17 @@ ext.ehcacheVersion = '2.9.0' ext.gebVersion = '0.10.0' ext.groovyVersion = '2.4.4' ext.hsqlVersion = '2.3.2' -ext.jacksonDatavindVersion = '2.4.4' +ext.hibernateVersion = '5.0.11.Final' +ext.hibernateValidatorVersion = '5.2.4.Final' +ext.jacksonDatavindVersion = '2.8.3' +ext.javaPersistenceVersion = '2.1.1' 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.seleniumVersion = '2.44.0' -ext.servletApiVersion = '3.0.1' +ext.servletApiVersion = '3.1.0' ext.slf4jVersion = '1.7.7' ext.spockVersion = '0.7-groovy-2.0' ext.springDataCommonsVersion = '1.12.2.RELEASE' @@ -36,6 +39,7 @@ ext.springSessionVersion = '1.2.1.RELEASE' ext.springBootVersion = '1.4.0.RELEASE' ext.thymeleafVersion = '2.1.5.RELEASE' ext.jsonassertVersion = '1.3.0' +ext.validationApiVersion = '1.1.0.Final' ext.spockDependencies = [ dependencies.create("org.spockframework:spock-spring:$spockVersion") { diff --git a/itest/web/itest-web.gradle b/itest/web/itest-web.gradle index 24dfdb5289..5747579623 100644 --- a/itest/web/itest-web.gradle +++ b/itest/web/itest-web.gradle @@ -13,7 +13,6 @@ dependencies { "org.mortbay.jetty:jetty-util:$jettyVersion", "org.testng:testng:6.8.21" testCompile ("org.mortbay.jetty:jetty:$jettyVersion") { - exclude group: 'org.mortbay.jetty', module: 'servlet-api' } testCompile ('net.sourceforge.jwebunit:jwebunit-core:2.2') { exclude group: 'javax.servlet', module: 'servlet-api' diff --git a/samples/javaconfig/chat/build.gradle b/samples/javaconfig/chat/build.gradle index a1983f3bde..c547ba62e4 100644 --- a/samples/javaconfig/chat/build.gradle +++ b/samples/javaconfig/chat/build.gradle @@ -14,8 +14,8 @@ dependencies { "org.springframework.data:spring-data-redis:${springDataRedisVersion}", "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final", "org.hsqldb:hsqldb:$hsqlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final", + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateVersion", "redis.clients:jedis:2.4.2", "com.github.kstyrc:embedded-redis:0.6", "org.apache.commons:commons-pool2:2.2", @@ -24,7 +24,7 @@ dependencies { "org.slf4j:slf4j-api:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", "com.fasterxml.jackson.core:jackson-databind:$jacksonDatavindVersion" - compile('org.hibernate:hibernate-entitymanager:3.6.10.Final') { + compile("org.hibernate:hibernate-entitymanager:$hibernateVersion") { exclude group:'javassist', module: 'javassist' } compile("org.springframework.data:spring-data-jpa:$springDataJpaVersion") { diff --git a/samples/javaconfig/concurrency/build.gradle b/samples/javaconfig/concurrency/build.gradle index 49387dfa21..ccc48eb7aa 100644 --- a/samples/javaconfig/concurrency/build.gradle +++ b/samples/javaconfig/concurrency/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/data/build.gradle b/samples/javaconfig/data/build.gradle index 2d4609c873..51b5dc17a7 100644 --- a/samples/javaconfig/data/build.gradle +++ b/samples/javaconfig/data/build.gradle @@ -2,9 +2,9 @@ dependencies { compile project(':spring-security-data'), project(':spring-security-config'), "org.springframework.data:spring-data-jpa:$springDataJpaVersion", - "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final", - 'org.hibernate:hibernate-entitymanager:3.6.10.Final', + "org.eclipse.persistence:javax.persistence:$javaPersistenceVersion", + "org.hibernate:hibernate-entitymanager:$hibernateVersion", "org.hsqldb:hsqldb:$hsqlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" } \ No newline at end of file diff --git a/samples/javaconfig/form/build.gradle b/samples/javaconfig/form/build.gradle index 3595c78182..8f0b2a75a5 100644 --- a/samples/javaconfig/form/build.gradle +++ b/samples/javaconfig/form/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/hellojs/build.gradle b/samples/javaconfig/hellojs/build.gradle index 8a6b4ad3e4..5b06640573 100644 --- a/samples/javaconfig/hellojs/build.gradle +++ b/samples/javaconfig/hellojs/build.gradle @@ -16,9 +16,9 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final", - "com.fasterxml.jackson.core:jackson-databind:2.2.1" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion", + "com.fasterxml.jackson.core:jackson-databind:$jacksonDatavindVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/hellomvc/build.gradle b/samples/javaconfig/hellomvc/build.gradle index d367903fec..092faf1917 100644 --- a/samples/javaconfig/hellomvc/build.gradle +++ b/samples/javaconfig/hellomvc/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/inmemory/build.gradle b/samples/javaconfig/inmemory/build.gradle index d367903fec..092faf1917 100644 --- a/samples/javaconfig/inmemory/build.gradle +++ b/samples/javaconfig/inmemory/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/jdbc/build.gradle b/samples/javaconfig/jdbc/build.gradle index 3595c78182..8f0b2a75a5 100644 --- a/samples/javaconfig/jdbc/build.gradle +++ b/samples/javaconfig/jdbc/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/ldap/build.gradle b/samples/javaconfig/ldap/build.gradle index cee3a521bd..2faa1e985b 100644 --- a/samples/javaconfig/ldap/build.gradle +++ b/samples/javaconfig/ldap/build.gradle @@ -18,8 +18,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/messages/build.gradle b/samples/javaconfig/messages/build.gradle index cf64c78849..00dcbdd592 100644 --- a/samples/javaconfig/messages/build.gradle +++ b/samples/javaconfig/messages/build.gradle @@ -8,8 +8,8 @@ dependencies { project(":spring-security-config"), "org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final", "org.hsqldb:hsqldb:$hsqlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final", + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion", "org.springframework:spring-webmvc:$springVersion", "org.springframework:spring-orm:$springVersion", "org.springframework:spring-context:$springVersion", diff --git a/samples/javaconfig/messages/src/main/java/org/springframework/security/samples/data/Message.java b/samples/javaconfig/messages/src/main/java/org/springframework/security/samples/data/Message.java index 59fc80be0c..447966fddd 100644 --- a/samples/javaconfig/messages/src/main/java/org/springframework/security/samples/data/Message.java +++ b/samples/javaconfig/messages/src/main/java/org/springframework/security/samples/data/Message.java @@ -27,7 +27,7 @@ import org.hibernate.validator.constraints.NotEmpty; @Entity public class Message { @Id - @GeneratedValue(strategy = GenerationType.AUTO) + @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotEmpty(message = "Message is required.") diff --git a/samples/javaconfig/openid/build.gradle b/samples/javaconfig/openid/build.gradle index ea6a911664..ebe90a42df 100644 --- a/samples/javaconfig/openid/build.gradle +++ b/samples/javaconfig/openid/build.gradle @@ -17,8 +17,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/preauth/build.gradle b/samples/javaconfig/preauth/build.gradle index 49387dfa21..ccc48eb7aa 100644 --- a/samples/javaconfig/preauth/build.gradle +++ b/samples/javaconfig/preauth/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/rememberme/build.gradle b/samples/javaconfig/rememberme/build.gradle index 49387dfa21..ccc48eb7aa 100644 --- a/samples/javaconfig/rememberme/build.gradle +++ b/samples/javaconfig/rememberme/build.gradle @@ -16,8 +16,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/javaconfig/x509/build.gradle b/samples/javaconfig/x509/build.gradle index e4f0b067ad..0405110d13 100644 --- a/samples/javaconfig/x509/build.gradle +++ b/samples/javaconfig/x509/build.gradle @@ -17,8 +17,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/samples/xml/insecuremvc/build.gradle b/samples/xml/insecuremvc/build.gradle index 37ac1a3d91..44c188c89c 100644 --- a/samples/xml/insecuremvc/build.gradle +++ b/samples/xml/insecuremvc/build.gradle @@ -13,8 +13,8 @@ dependencies { "org.slf4j:jul-to-slf4j:$slf4jVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", "javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:$jstlVersion", - "javax.validation:validation-api:1.0.0.GA", - "org.hibernate:hibernate-validator:4.2.0.Final" + "javax.validation:validation-api:$validationApiVersion", + "org.hibernate:hibernate-validator:$hibernateValidatorVersion" runtime "opensymphony:sitemesh:2.4.2", "cglib:cglib-nodep:$cglibVersion", diff --git a/sandbox/heavyduty/build.gradle b/sandbox/heavyduty/build.gradle index 502a1b0b5d..4533d90ba4 100644 --- a/sandbox/heavyduty/build.gradle +++ b/sandbox/heavyduty/build.gradle @@ -23,7 +23,7 @@ dependencies { "org.springframework:spring-webmvc:$springVersion", 'org.aspectj:aspectjrt:1.6.8', 'org.hibernate:ejb3-persistence:1.0.2.GA', - 'javax.persistence:persistence-api:1.0', + "org.eclipse.persistence:javax.persistence:$javaPersistenceVersion", 'org.slf4j:jcl-over-slf4j:1.5.11' providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion" diff --git a/web/src/main/java/org/springframework/security/web/util/OnCommittedResponseWrapper.java b/web/src/main/java/org/springframework/security/web/util/OnCommittedResponseWrapper.java index dddd8f8e58..c2f34d4409 100644 --- a/web/src/main/java/org/springframework/security/web/util/OnCommittedResponseWrapper.java +++ b/web/src/main/java/org/springframework/security/web/util/OnCommittedResponseWrapper.java @@ -20,6 +20,7 @@ import java.io.PrintWriter; import java.util.Locale; import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; @@ -638,6 +639,14 @@ public abstract class OnCommittedResponseWrapper extends HttpServletResponseWrap this.delegate.write(b, off, len); } + public boolean isReady() { + return this.delegate.isReady(); + } + + public void setWriteListener(WriteListener writeListener) { + this.delegate.setWriteListener(writeListener); + } + @Override public String toString() { return getClass().getName() + "[delegate=" + this.delegate.toString() + "]";