SUPPORT-9212: фикс

This commit is contained in:
adel.ka 2025-06-12 19:47:43 +03:00
parent 8f9d392374
commit b90f4328b9
2 changed files with 8 additions and 8 deletions

View file

@ -19,7 +19,11 @@ import net.javacrumbs.shedlock.spring.ScheduledLockConfigurationBuilder;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.*; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

View file

@ -81,8 +81,7 @@ public class IdmDirectoriesService {
UpsertMessage<T> message = objectMapper.readValue(kafkaMessage, messageType); UpsertMessage<T> message = objectMapper.readValue(kafkaMessage, messageType);
if (Boolean.TRUE.equals(message.isSuccess()) if (message.isSuccess() && message.getData() != null) {
&& message.getData() != null) {
DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass); DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass);
if (processor == null) { if (processor == null) {
throw new IllegalStateException("No processor found for " + entityClass.getSimpleName()); throw new IllegalStateException("No processor found for " + entityClass.getSimpleName());
@ -103,8 +102,7 @@ public class IdmDirectoriesService {
ChangeActiveMessage.class ChangeActiveMessage.class
); );
if (Boolean.TRUE.equals(changeActiveMessage.isSuccess()) if (changeActiveMessage.isSuccess() && changeActiveMessage.getData() != null) {
&& changeActiveMessage.getData() != null) {
DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass); DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass);
if (processor == null) { if (processor == null) {
throw new IllegalStateException("No processor found for " + entityClass.getSimpleName()); throw new IllegalStateException("No processor found for " + entityClass.getSimpleName());
@ -125,10 +123,8 @@ public class IdmDirectoriesService {
.constructParametricType(DeleteLinkMessage.class, entityClass); .constructParametricType(DeleteLinkMessage.class, entityClass);
DeleteLinkMessage<T> message = objectMapper.readValue(kafkaMessage, messageType); DeleteLinkMessage<T> message = objectMapper.readValue(kafkaMessage, messageType);
if (message.isSuccess() && message.getData() != null) {
if (Boolean.TRUE.equals(message.isSuccess()) && message.getData() != null) {
DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass); DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass);
if (processor instanceof LinkDataProcessor<T, ?> linkProcessor) { if (processor instanceof LinkDataProcessor<T, ?> linkProcessor) {
linkProcessor.deleteLink(message.getData()); linkProcessor.deleteLink(message.getData());
} }