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