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
This commit is contained in:
Michael Golubev
2019-07-02 06:52:16 +03:00
committed by intellij-monorepo-bot
parent 240ce5a8cb
commit a7decca33a
@@ -119,6 +119,13 @@ public class RemoteAgentReflectiveProxyFactory extends RemoteAgentProxyFactoryBa
myMirrorType = mirrorValue.getClass();
myMirrorValue = value == null ? null : mirrorValue;
}
else if (type.isEnum()) {
@SuppressWarnings("unchecked")
Class<? extends Enum> mirroredEnum = (Class<? extends Enum>)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