From a7decca33a0ccad3322d3b099bc44bf02d0ed982 Mon Sep 17 00:00:00 2001 From: Michael Golubev Date: Fri, 14 Jun 2019 11:37:32 +0200 Subject: [PATCH] IDEA-215876 - Docker: separate from old remote-servers API to complete switch to new services view - mirror Enum values to allow them to pass agent reflective barrier GitOrigin-RevId: 36205667c3dbdf6e1d47f50e5bfd2d2c8696318b --- .../agent/impl/RemoteAgentReflectiveProxyFactory.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/remote-servers/impl/src/com/intellij/remoteServer/agent/impl/RemoteAgentReflectiveProxyFactory.java b/platform/remote-servers/impl/src/com/intellij/remoteServer/agent/impl/RemoteAgentReflectiveProxyFactory.java index 351ee61f2903..01268e0eaf7b 100644 --- a/platform/remote-servers/impl/src/com/intellij/remoteServer/agent/impl/RemoteAgentReflectiveProxyFactory.java +++ b/platform/remote-servers/impl/src/com/intellij/remoteServer/agent/impl/RemoteAgentReflectiveProxyFactory.java @@ -119,6 +119,13 @@ public class RemoteAgentReflectiveProxyFactory extends RemoteAgentProxyFactoryBa myMirrorType = mirrorValue.getClass(); myMirrorValue = value == null ? null : mirrorValue; } + else if (type.isEnum()) { + @SuppressWarnings("unchecked") + Class mirroredEnum = (Class)mirrorClassLoader.loadClass(type.getName()); + myMirrorType = mirroredEnum; + //noinspection unchecked + myMirrorValue = value == null ? null : Enum.valueOf(mirroredEnum, ((Enum)value).name()); + } else if (type.isInterface()) { myMirrorType = mirrorClassLoader.loadClass(type.getName()); myMirrorValue = value == null ? null