DATAJPA-407 - Fixes potential IndexOutOfBoundsException in ClasspathScanningPersistenceUnitPostProcessor.

So far, ClasspathScanningPersistenceUnitPostProcessor threw an IndexOutOfBoundsException on Windows as the OS-specific file separator doesn't match the forward slash used in the URI. This is fixed by modified scanForMappingFileLocations() to use '/' to build up the resource path.

Original pull request: #44.
This commit is contained in:
Thomas Darimont
2013-10-01 15:21:27 +02:00
committed by Oliver Gierke
parent 32f0f7830d
commit 18f89afa78
2 changed files with 13 additions and 3 deletions

View File

@@ -72,6 +72,9 @@ public class ClasspathScanningPersistenceUnitPostProcessorUnitTests {
verify(pui).addManagedClassName(SampleEntity.class.getName());
}
/**
* @see DATAJPA-407
*/
@Test
public void findsMappingFile() {
@@ -89,6 +92,7 @@ public class ClasspathScanningPersistenceUnitPostProcessorUnitTests {
/**
* @see DATAJPA-353
* @see DATAJPA-407
*/
@Test
public void shouldFindJpaMappingFilesFromMultipleLocationsOnClasspath() {