DATAJPA-1017 - Tweaked test setup to run fine against Spring 5.
We now use Hibernate 4.3 when running CI tests for Spring 5. Adapted to template method signature change in PathMatchingResourcePatternResolver.
This commit is contained in:
@@ -8,8 +8,8 @@ env:
|
||||
- PROFILE=ci
|
||||
- PROFILE=spring43
|
||||
- PROFILE=spring43-next
|
||||
- PROFILE=spring5
|
||||
- PROFILE=spring5-next
|
||||
- PROFILE=spring5,hibernate-43
|
||||
- PROFILE=spring5-next,hibernate-43
|
||||
- PROFILE=hibernate-41
|
||||
- PROFILE=hibernate-42
|
||||
- PROFILE=hibernate-42-next
|
||||
|
||||
4
pom.xml
4
pom.xml
@@ -597,8 +597,8 @@
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-plugins-release</id>
|
||||
<url>https://repo.spring.io/plugins-release</url>
|
||||
<id>spring-plugins-snapshot</id>
|
||||
<url>https://repo.spring.io/plugins-snapshot</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.data.jpa.support;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
@@ -138,15 +139,19 @@ public class ClasspathScanningPersistenceUnitPostProcessorUnitTests {
|
||||
return resources;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.io.support.PathMatchingResourcePatternResolver#doFindPathMatchingJarResources(org.springframework.core.io.Resource, java.net.URL, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource, String subPattern)
|
||||
throws IOException {
|
||||
protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource, URL rootDirURL,
|
||||
String subPattern) throws IOException {
|
||||
|
||||
if (fileInJarUrl.equals(rootDirResource.getURI().toString())) {
|
||||
if (fileInJarUrl.equals(rootDirURL.toString())) {
|
||||
return Collections.singleton(rootDirResource);
|
||||
}
|
||||
|
||||
return super.doFindPathMatchingJarResources(rootDirResource, subPattern);
|
||||
return super.doFindPathMatchingJarResources(rootDirResource, rootDirURL, subPattern);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user