Browse Source

Fix incorrect resource name generation (#9957)

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 "/".
tags/8.2.0.alpha2
Dos Moonen 6 years ago
parent
commit
b75136b70f

+ 1
- 1
server/src/test/java/com/vaadin/server/AbstractClientConnectorTest.java View 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);

Loading…
Cancel
Save