DATAJPA-1021 - Adapt API in test classes to be Spring 5 compatible.

This commit is contained in:
Oliver Gierke
2016-12-07 12:43:48 +01:00
parent b975566d99
commit 911b9f70cd

View File

@@ -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);
}
};