From 02c514679b9b32ec5d7e28d20eb8e07fef440343 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Mon, 16 Dec 2024 11:46:15 +0530 Subject: [PATCH] Fix checkstyle --- .../org/apache/druid/k8s/discovery/DefaultK8sApiClient.java | 4 ++-- .../main/java/org/apache/druid/segment/column/ValueType.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions-core/kubernetes-extensions/src/main/java/org/apache/druid/k8s/discovery/DefaultK8sApiClient.java b/extensions-core/kubernetes-extensions/src/main/java/org/apache/druid/k8s/discovery/DefaultK8sApiClient.java index fad7fcd6f473..04ee4683274d 100644 --- a/extensions-core/kubernetes-extensions/src/main/java/org/apache/druid/k8s/discovery/DefaultK8sApiClient.java +++ b/extensions-core/kubernetes-extensions/src/main/java/org/apache/druid/k8s/discovery/DefaultK8sApiClient.java @@ -131,7 +131,7 @@ public boolean hasNext() throws SocketTimeoutException try { while (watch.hasNext()) { Watch.Response item = watch.next(); - if (item != null && item.type != null && !item.type.equals(BOOKMARK)) { + if (item != null && item.type != null && !BOOKMARK.equals(item.type)) { DiscoveryDruidNodeAndResourceVersion result = null; if (item.object != null) { result = new DiscoveryDruidNodeAndResourceVersion( @@ -150,7 +150,7 @@ public boolean hasNext() throws SocketTimeoutException result ); return true; - } else if (item != null && item.type != null && item.type.equals(BOOKMARK)) { + } else if (item != null && item.type != null && BOOKMARK.equals(item.type)) { // Events with type BOOKMARK will only contain resourceVersion and no metadata. See // Kubernetes API documentation for details. LOGGER.debug("BOOKMARK event fired, no nothing, only update resourceVersion"); diff --git a/processing/src/main/java/org/apache/druid/segment/column/ValueType.java b/processing/src/main/java/org/apache/druid/segment/column/ValueType.java index 2b8bf0095f03..083e87bf5fc9 100644 --- a/processing/src/main/java/org/apache/druid/segment/column/ValueType.java +++ b/processing/src/main/java/org/apache/druid/segment/column/ValueType.java @@ -128,7 +128,7 @@ public boolean isArray() @Override public boolean isPrimitive() { - return this.equals(STRING) || isNumeric(this); + return STRING.equals(this) || isNumeric(this); } @Nullable