From fe3aad4ab28b892b0152fe3eea84db530fe6e15d Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 23 Sep 2015 22:03:08 +0200 Subject: [PATCH] Latest dependency updates (H2 1.4.189, Underscore.js 1.8.3) --- build.gradle | 8 +++---- .../WebJarsResourceResolverTests.java | 21 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 0c83e830e7..5655c2171a 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ ext { linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git' linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git' - moduleProjects = subprojects.findAll { + moduleProjects = subprojects.findAll { !it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom') } } @@ -141,7 +141,7 @@ configure(allprojects) { project -> testCompile("org.hamcrest:hamcrest-all:${hamcrestVersion}") sniffer("org.codehaus.mojo:animal-sniffer-ant-tasks:${snifferVersion}") - javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // as from JDK 6 update 18 + javaApiSignature("org.codehaus.mojo.signature:java16:1.1@signature") // API level from JDK 6 update 18 } task copyJavaApiSignature(type: Copy) { @@ -628,7 +628,7 @@ project("spring-jdbc") { optional("javax.transaction:javax.transaction-api:${jtaVersion}") optional("com.mchange:c3p0:0.9.5.1") optional("org.hsqldb:hsqldb:${hsqldbVersion}") - optional("com.h2database:h2:1.4.188") + optional("com.h2database:h2:1.4.189") optional("org.apache.derby:derby:10.11.1.1") optional("org.apache.derby:derbyclient:10.11.1.1") } @@ -937,7 +937,7 @@ project("spring-webmvc") { testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}") testCompile("org.jruby:jruby:${jrubyVersion}") testCompile("org.python:jython-standalone:2.5.3") - testCompile("org.webjars:underscorejs:1.8.2") + testCompile("org.webjars:underscorejs:1.8.3") } } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java index 20c3fad00d..71d932de11 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/WebJarsResourceResolverTests.java @@ -16,16 +16,8 @@ package org.springframework.web.servlet.resource; -import static org.junit.Assert.*; -import static org.mockito.BDDMockito.*; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - import java.util.Collections; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; @@ -35,6 +27,13 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + /** * Unit tests for * {@link org.springframework.web.servlet.resource.WebJarsResourceResolver}. @@ -51,6 +50,7 @@ public class WebJarsResourceResolverTests { private HttpServletRequest request = new MockHttpServletRequest(); + @Before public void setup() { // for this to work, an actual WebJar must be on the test classpath @@ -59,6 +59,7 @@ public class WebJarsResourceResolverTests { this.chain = mock(ResourceResolverChain.class); } + @Test public void resolveUrlExisting() { this.locations = Collections.singletonList(new ClassPathResource("/META-INF/resources/webjars/", getClass())); @@ -87,7 +88,7 @@ public class WebJarsResourceResolverTests { @Test public void resolveUrlWebJarResource() { String file = "/underscorejs/underscore.js"; - String expected = "/underscorejs/1.8.2/underscore.js"; + String expected = "/underscorejs/1.8.3/underscore.js"; given(this.chain.resolveUrlPath(file, this.locations)).willReturn(null); given(this.chain.resolveUrlPath(expected, this.locations)).willReturn(expected); @@ -139,7 +140,7 @@ public class WebJarsResourceResolverTests { public void resolveResourceWebJar() { Resource expected = mock(Resource.class); String file = "/underscorejs/underscore.js"; - String expectedPath = "/underscorejs/1.8.2/underscore.js"; + String expectedPath = "/underscorejs/1.8.3/underscore.js"; this.locations = Collections.singletonList(new ClassPathResource("/META-INF/resources/webjars/", getClass())); given(this.chain.resolveResource(this.request, expectedPath, this.locations)).willReturn(expected);