Skip to content

Commit

Permalink
[INLONG-6014][Manager] Int type cannot be compared with null using "=…
Browse files Browse the repository at this point in the history
…=" (#6015)
  • Loading branch information
ciscozhou committed Sep 24, 2022
1 parent c2c2c30 commit dd1b8fd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
@Service
public class ConsumePulsarOperator extends AbstractConsumeOperator {

private static final int DLQ_RLQ_ENABLE = 1;
private static final int DLQ__RLQ_DISABLE = 0;
private static final Integer DLQ_RLQ_ENABLE = 1;
private static final Integer DLQ__RLQ_DISABLE = 0;
// Topic prefix for the dead letter queue
private static final String PREFIX_DLQ = "dlq";
// Topic prefix for the retry letter queue
Expand Down Expand Up @@ -116,8 +116,8 @@ protected void setTargetEntity(InlongConsumeRequest request, InlongConsumeEntity
// prerequisite for RLQ to be turned on: DLQ must be turned on.
// it means, if DLQ is closed, RLQ cannot exist alone and must be closed.
ConsumePulsarRequest pulsarRequest = (ConsumePulsarRequest) request;
boolean dlqEnable = (DLQ_RLQ_ENABLE == pulsarRequest.getIsDlq());
boolean rlqEnable = (DLQ_RLQ_ENABLE == pulsarRequest.getIsRlq());
boolean dlqEnable = DLQ_RLQ_ENABLE.equals(pulsarRequest.getIsDlq());
boolean rlqEnable = DLQ_RLQ_ENABLE.equals(pulsarRequest.getIsRlq());
if (rlqEnable && !dlqEnable) {
throw new BusinessException(ErrorCodeEnum.PULSAR_DLQ_RLQ_ERROR);
}
Expand Down

0 comments on commit dd1b8fd

Please sign in to comment.