From 0756bbfccf9f99f73082b5a87970c6e08fdfefc5 Mon Sep 17 00:00:00 2001 From: Vlad Mihalcea Date: Thu, 10 Mar 2016 10:04:25 +0200 Subject: [PATCH] HHH-4161 - persistence.xml not following JSR220 spec Switch to an OS-independent way of checking absolute paths --- .../boot/archive/internal/StandardArchiveDescriptorFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/StandardArchiveDescriptorFactory.java b/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/StandardArchiveDescriptorFactory.java index 4ec75ce8e1..54db8e6655 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/StandardArchiveDescriptorFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/StandardArchiveDescriptorFactory.java @@ -101,7 +101,7 @@ public class StandardArchiveDescriptorFactory implements ArchiveDescriptorFactor } final String filePart = extractLocalFilePath( url ); - if ( filePart.startsWith( "/" ) ) { + if ( filePart.startsWith( "/" ) || new File(url.getFile()).isAbsolute() ) { // the URL is already an absolute form return url; }