[Fix-14284][DAO] update the check of Integer in equals() (#14285)
(cherry picked from commit 929811760a)
This commit is contained in:
parent
dc508f075c
commit
27eeb3aada
|
|
@ -18,6 +18,7 @@
|
|||
package org.apache.dolphinscheduler.dao.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ public class AccessToken {
|
|||
}
|
||||
AccessToken that = (AccessToken) o;
|
||||
|
||||
if (id != that.id) {
|
||||
if (!Objects.equals(id, that.id)) {
|
||||
return false;
|
||||
}
|
||||
if (userId != that.userId) {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
package org.apache.dolphinscheduler.dao.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -77,7 +78,7 @@ public class AlertGroup {
|
|||
|
||||
AlertGroup that = (AlertGroup) o;
|
||||
|
||||
if (id != that.id) {
|
||||
if (!Objects.equals(id, that.id)) {
|
||||
return false;
|
||||
}
|
||||
if (createUserId != that.createUserId) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.dao.entity;
|
|||
import org.apache.dolphinscheduler.spi.enums.DbType;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -102,7 +103,7 @@ public class DataSource {
|
|||
|
||||
DataSource that = (DataSource) o;
|
||||
|
||||
if (id != that.id) {
|
||||
if (!Objects.equals(id, that.id)) {
|
||||
return false;
|
||||
}
|
||||
return name.equals(that.name);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package org.apache.dolphinscheduler.dao.entity;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
|
@ -59,7 +61,7 @@ public class ProcessInstanceMap {
|
|||
|
||||
ProcessInstanceMap that = (ProcessInstanceMap) o;
|
||||
|
||||
if (id != that.id) {
|
||||
if (!Objects.equals(id, that.id)) {
|
||||
return false;
|
||||
}
|
||||
if (parentProcessInstanceId != that.parentProcessInstanceId) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
package org.apache.dolphinscheduler.dao.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -82,7 +83,7 @@ public class Queue {
|
|||
|
||||
Queue queue1 = (Queue) o;
|
||||
|
||||
if (id != queue1.id) {
|
||||
if (!Objects.equals(id, queue1.id)) {
|
||||
return false;
|
||||
}
|
||||
if (!queueName.equals(queue1.queueName)) {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.dao.entity;
|
|||
import org.apache.dolphinscheduler.spi.enums.ResourceType;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -149,7 +150,7 @@ public class Resource {
|
|||
|
||||
Resource resource = (Resource) o;
|
||||
|
||||
if (id != resource.id) {
|
||||
if (!Objects.equals(id, resource.id)) {
|
||||
return false;
|
||||
}
|
||||
return alias.equals(resource.alias);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class Tenant {
|
|||
|
||||
Tenant tenant = (Tenant) o;
|
||||
|
||||
return id == tenant.id;
|
||||
return Objects.equals(id, tenant.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import org.apache.dolphinscheduler.common.utils.JSONUtils;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -124,7 +125,7 @@ public class UdfFunc {
|
|||
|
||||
UdfFunc udfFunc = (UdfFunc) o;
|
||||
|
||||
if (id != udfFunc.id) {
|
||||
if (!Objects.equals(id, udfFunc.id)) {
|
||||
return false;
|
||||
}
|
||||
return !(funcName != null ? !funcName.equals(udfFunc.funcName) : udfFunc.funcName != null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue