From ac1e5c2e173f234c0e567cbe5296a27b575628d4 Mon Sep 17 00:00:00 2001 From: Stephen O'Donnell Date: Fri, 8 Nov 2024 15:01:29 +0000 Subject: [PATCH] HDDS-11669. In OmUtils.normalizeKey isDebugEnabled should be evaluated first (#7411) (cherry picked from commit ef2bf98c3798b2ab9a656969d7093a5b7f034cb4) --- .../common/src/main/java/org/apache/hadoop/ozone/OmUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java index d6320061253c..9565d2db8efc 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java @@ -767,7 +767,7 @@ public static String normalizeKey(String keyName, normalizedKeyName = new Path(OM_KEY_PREFIX + keyName) .toUri().getPath(); } - if (!keyName.equals(normalizedKeyName) && LOG.isDebugEnabled()) { + if (LOG.isDebugEnabled() && !keyName.equals(normalizedKeyName)) { LOG.debug("Normalized key {} to {} ", keyName, normalizedKeyName.substring(1)); }