SUPPORT-9212: фикс
This commit is contained in:
parent
0f2588e7cc
commit
226c554eaf
2 changed files with 11 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class UpsertMessage<T>{
|
public class UpsertMessage<T>{
|
||||||
private T data;
|
private T data;
|
||||||
|
private boolean success;
|
||||||
|
|
||||||
public T getData() {
|
public T getData() {
|
||||||
return data;
|
return data;
|
||||||
|
|
@ -17,4 +18,12 @@ public class UpsertMessage<T>{
|
||||||
public void setData(T data) {
|
public void setData(T data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSuccess() {
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccess(boolean success) {
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,8 @@ public class IdmDirectoriesService {
|
||||||
|
|
||||||
UpsertMessage<T> message = objectMapper.readValue(kafkaMessage, messageType);
|
UpsertMessage<T> message = objectMapper.readValue(kafkaMessage, messageType);
|
||||||
|
|
||||||
if (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 == null) {
|
if (processor == null) {
|
||||||
throw new IllegalStateException("No processor found for " + entityClass.getSimpleName());
|
throw new IllegalStateException("No processor found for " + entityClass.getSimpleName());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue