ValidationResultType (@NotNull String data, @NotNull EventContext context) { PluginInfo info = context.getPayload(PLUGIN_INFO); if (info != null) { return info.isSafeToReport() ? ValidationResultType.ACCEPTED : ValidationResultType.THIRD_PARTY; } Object tipId = context.eventData.get("tip_id"); if (tipId instanceof String) { TipAndTrickBean tip = TipAndTrickBean.findById((String)tipId); if (tip != null) { PluginInfo pluginInfo = PluginInfoDetectorKt.getPluginInfoByDescriptor(tip.getPluginDescriptor()); context.setPayload(PLUGIN_INFO, pluginInfo); return pluginInfo.isSafeToReport() ? ValidationResultType.ACCEPTED : ValidationResultType.THIRD_PARTY; } } return ValidationResultType.REJECTED; }