diff --git a/python/python-psi-impl/src/com/jetbrains/python/vp/ViewPresenterUtils.java b/python/python-psi-impl/src/com/jetbrains/python/vp/ViewPresenterUtils.java index 500764b308a3..080e624911ef 100644 --- a/python/python-psi-impl/src/com/jetbrains/python/vp/ViewPresenterUtils.java +++ b/python/python-psi-impl/src/com/jetbrains/python/vp/ViewPresenterUtils.java @@ -63,6 +63,7 @@ public final class ViewPresenterUtils { private static C createProxy(Class clazz, InvocationHandler handler) { assert clazz != null; assert handler != null; - return ReflectionUtil.proxy(ViewPresenterUtils.class.getClassLoader(), clazz, handler); + ClassLoader classLoader = clazz.getClassLoader(); // clazz's class loader allows [java.lang.reflect.Proxy#ensureVisible] + return ReflectionUtil.proxy(classLoader, clazz, handler); } }