Fix EdqsState.isApiReady
This commit is contained in:
parent
a736f5d212
commit
11fc6358b4
@ -20,7 +20,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
|
||||
import static org.apache.commons.lang3.BooleanUtils.toBooleanDefaultIfNull;
|
||||
|
||||
@Getter
|
||||
@NoArgsConstructor
|
||||
@ -34,14 +35,14 @@ public class EdqsState {
|
||||
private EdqsApiMode apiMode;
|
||||
|
||||
public boolean updateEdqsReady(boolean ready) {
|
||||
boolean changed = BooleanUtils.toBooleanDefaultIfNull(this.edqsReady, false) != ready;
|
||||
boolean changed = toBooleanDefaultIfNull(this.edqsReady, false) != ready;
|
||||
this.edqsReady = ready;
|
||||
return changed;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public boolean isApiReady() {
|
||||
return edqsReady && syncStatus == EdqsSyncStatus.FINISHED;
|
||||
return toBooleanDefaultIfNull(edqsReady, false) && syncStatus == EdqsSyncStatus.FINISHED;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user