From 8fd4694c6f4952e1ba2b18453b8603e23e74b514 Mon Sep 17 00:00:00 2001 From: miguel-vila Date: Fri, 20 Sep 2024 11:24:02 +0100 Subject: [PATCH] use fqn for Objects.hashCode, take into account parent Signed-off-by: miguel-vila --- .../client/opensearch/_types/BaseNode.java | 10 +++++----- .../opensearch/_types/BulkByScrollFailure.java | 10 +++++----- .../_types/BulkByScrollTaskStatus.java | 8 ++++---- .../client/opensearch/_types/ErrorCause.java | 12 ++++++------ .../client/opensearch/_types/NodeStatistics.java | 2 +- .../opensearch/_types/OpenSearchVersionInfo.java | 2 +- .../client/opensearch/_types/ShardFailure.java | 6 +++--- .../opensearch/_types/ShardStatistics.java | 2 +- .../DeleteDanglingIndexResponse.java | 2 +- .../ImportDanglingIndexResponse.java | 2 +- .../ListDanglingIndicesResponse.java | 4 ++-- .../list_dangling_indices/DanglingIndex.java | 2 +- .../opensearch/ml/DeleteModelGroupResponse.java | 2 +- .../opensearch/ml/DeleteModelResponse.java | 2 +- .../client/opensearch/ml/DeleteTaskResponse.java | 2 +- .../opensearch/ml/DeployModelResponse.java | 2 +- .../client/opensearch/ml/GetTaskResponse.java | 12 ++++++------ .../client/opensearch/ml/UndeployModelNode.java | 2 +- .../opensearch/ml/UndeployModelResponse.java | 2 +- .../client/opensearch/tasks/CancelResponse.java | 2 +- .../opensearch/tasks/GetTasksResponse.java | 4 ++-- .../client/opensearch/tasks/ListResponse.java | 2 +- .../client/opensearch/tasks/Status.java | 16 ++++++++-------- .../opensearch/tasks/TaskExecutingNode.java | 2 +- .../client/opensearch/tasks/TaskGroup.java | 4 ++-- .../client/opensearch/tasks/TaskInfo.java | 8 ++++---- .../opensearch/tasks/TaskListResponseBase.java | 8 ++++---- .../client/opensearch/tasks/TaskResponse.java | 8 ++++---- .../templates/ObjectShape/HashCode.mustache | 7 ++++++- 29 files changed, 76 insertions(+), 71 deletions(-) diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java index 7346291502..382e9b88f4 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BaseNode.java @@ -284,12 +284,12 @@ protected static > void setupBaseNode public int hashCode() { int result = 17; - result = 31 * result + (attributes != null ? this.attributes.hashCode() : 0); - result = 31 * result + (host != null ? this.host.hashCode() : 0); - result = 31 * result + (ip != null ? this.ip.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.attributes); + result = 31 * result + java.util.Objects.hashCode(this.host); + result = 31 * result + java.util.Objects.hashCode(this.ip); result = 31 * result + this.name.hashCode(); - result = 31 * result + (roles != null ? this.roles.hashCode() : 0); - result = 31 * result + (transportAddress != null ? this.transportAddress.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.roles); + result = 31 * result + java.util.Objects.hashCode(this.transportAddress); return result; } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java index 9001de4dd4..4c59014651 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/BulkByScrollFailure.java @@ -316,11 +316,11 @@ protected static void setupBulkByScrollFailureDeserializer(ObjectDeserializer public int hashCode() { int result = 17; result = 31 * result + Integer.hashCode(this.batches); - result = 31 * result + (canceled != null ? this.canceled.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.canceled); result = 31 * result + Long.hashCode(this.created); result = 31 * result + Long.hashCode(this.deleted); result = 31 * result + Long.hashCode(this.noops); - result = 31 * result + (phase != null ? this.phase.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.phase); result = 31 * result + Float.hashCode(this.requestsPerSecond); - result = 31 * result + (retries != null ? this.retries.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.retries); result = 31 * result + Integer.hashCode(this.sliceId); - result = 31 * result + (slices != null ? this.slices.hashCode() : 0); - result = 31 * result + (state != null ? this.state.hashCode() : 0); - result = 31 * result + (throttled != null ? this.throttled.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.slices); + result = 31 * result + java.util.Objects.hashCode(this.state); + result = 31 * result + java.util.Objects.hashCode(this.throttled); result = 31 * result + Long.hashCode(this.throttledMillis); - result = 31 * result + (throttledUntil != null ? this.throttledUntil.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.throttledUntil); result = 31 * result + Long.hashCode(this.throttledUntilMillis); result = 31 * result + Long.hashCode(this.total); result = 31 * result + Long.hashCode(this.updated); result = 31 * result + Long.hashCode(this.versionConflicts); - result = 31 * result + (metadata != null ? this.metadata.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.metadata); return result; } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java index cf7044462d..d609e19baf 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskExecutingNode.java @@ -162,7 +162,7 @@ protected static void setupTaskExecutingNodeDeserializer(ObjectDeserializer> void setupTaskList public int hashCode() { int result = 17; - result = 31 * result + (nodeFailures != null ? this.nodeFailures.hashCode() : 0); - result = 31 * result + (nodes != null ? this.nodes.hashCode() : 0); - result = 31 * result + (taskFailures != null ? this.taskFailures.hashCode() : 0); - result = 31 * result + (tasks != null ? this.tasks.hashCode() : 0); + result = 31 * result + java.util.Objects.hashCode(this.nodeFailures); + result = 31 * result + java.util.Objects.hashCode(this.nodes); + result = 31 * result + java.util.Objects.hashCode(this.taskFailures); + result = 31 * result + java.util.Objects.hashCode(this.tasks); return result; } diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java index c44b6c8916..04a46a16dd 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/tasks/TaskResponse.java @@ -722,7 +722,7 @@ protected static void setupTaskResponseDeserializer(ObjectDeserializer