@SuppressWarnings("deprecation")
    private Object deserializeEventMessage(AgentEventBo agentEventBo) {
        try {
            final int version = agentEventBo.getVersion();
            return switch (agentEventBo.getVersion()) {
                case AgentEventBo.LEGACY_VERSION ->
                        throw new UnsupportedEncodingException("invalid legacy version " + version);
                case AgentEventBo.CURRENT_VERSION ->
                        this.agentEventMessageDeserializerV1.deserialize(agentEventBo.getEventType(), agentEventBo.getEventBody());
                default -> throw new UnsupportedEncodingException("invalid version " + version);
            };
        } catch (UnsupportedEncodingException e) {
            logger.warn("error deserializing event message", e);
            return null;
        }
    }
@author HyunGil Jeong
@author jaehong.kim - Add agentEventMessageDeserializerV1
web/src/main/java/com/navercorp/pinpoint/web/service/AgentEventServiceImpl.java