]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix incorrect resource name generation (#9957)
authorDos Moonen <darsstar@gmail.com>
Mon, 11 Sep 2017 10:18:05 +0000 (12:18 +0200)
committerHenri Sara <henri.sara@gmail.com>
Mon, 11 Sep 2017 10:18:05 +0000 (13:18 +0300)
Javadoc has this to say about ClassLoader#getResource(String): "The name of a resource is a '/'-separated path name that identifies the resource."
The test fails on Windows because its File.separator does not equal "/".

server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java

index dbf36377c2e8eb3d426b37e2d9dd86a5c2022939..b43de2f4562ab07186f78f8c5262ce14421f68c2 100644 (file)
@@ -162,7 +162,7 @@ public class AbstractClientConnectorTest {
             if (!name.startsWith("com.vaadin.")) {
                 return super.loadClass(name);
             }
-            String path = name.replaceAll("\\.", File.separator)
+            String path = name.replace('.', '/')
                     .concat(".class");
             URL resource = Thread.currentThread().getContextClassLoader()
                     .getResource(path);