aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin')
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java4
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/Design.java5
2 files changed, 6 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java b/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
index b2241f5ba5..2c014e7d47 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
@@ -24,7 +24,7 @@ import java.security.PrivilegedAction;
* @since 7.4
* @author Vaadin Ltd
*/
-class VaadinServiceClassLoaderUtil {
+public class VaadinServiceClassLoaderUtil {
private static class GetClassLoaderPrivilegedAction
implements PrivilegedAction<ClassLoader> {
@@ -48,7 +48,7 @@ class VaadinServiceClassLoaderUtil {
* if current security policy doesn't allow acquiring current
* thread's context class loader
*/
- static protected ClassLoader findDefaultClassLoader()
+ public static ClassLoader findDefaultClassLoader()
throws SecurityException {
return AccessController.doPrivileged(
new VaadinServiceClassLoaderUtil.GetClassLoaderPrivilegedAction());
diff --git a/server/src/main/java/com/vaadin/ui/declarative/Design.java b/server/src/main/java/com/vaadin/ui/declarative/Design.java
index 027fb3bc02..e0c601efbc 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/Design.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/Design.java
@@ -36,6 +36,7 @@ import org.jsoup.parser.Parser;
import org.jsoup.select.Elements;
import com.vaadin.annotations.DesignRoot;
+import com.vaadin.server.VaadinServiceClassLoaderUtil;
import com.vaadin.shared.util.SharedUtil;
import com.vaadin.ui.Component;
import com.vaadin.ui.declarative.DesignContext.ComponentCreatedEvent;
@@ -192,7 +193,9 @@ public class Design implements Serializable {
protected Class<? extends Component> resolveComponentClass(
String qualifiedClassName, DesignContext context) {
try {
- Class<?> componentClass = Class.forName(qualifiedClassName);
+ Class<?> componentClass = Class.forName(qualifiedClassName,
+ true,
+ VaadinServiceClassLoaderUtil.findDefaultClassLoader());
return componentClass.asSubclass(Component.class);
} catch (ClassNotFoundException e) {
throw new DesignException("Unable to load component for design",