From: Robert Varga Date: Thu, 3 Aug 2023 17:11:28 +0000 (+0200) Subject: Do not use LogicalDatastoreType.name() in logging X-Git-Tag: v6.0.1~13 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=ce9902c097e186511e3d68b6d9524d92d94a8bf7;p=netconf.git Do not use LogicalDatastoreType.name() in logging Issuing name() has no effect -- it is the same as toString(), and slf4j will do that for us. Change-Id: Ibb89475de803bd2f77e190f96264e2cebe0065d4 Signed-off-by: Robert Varga (cherry picked from commit 803fa31e5301ddf9a48ebdac9a07c6fbe8c6a042) --- diff --git a/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PatchDataTransactionUtil.java b/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PatchDataTransactionUtil.java index 7667077d16..43cb987fb6 100644 --- a/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PatchDataTransactionUtil.java +++ b/restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/utils/PatchDataTransactionUtil.java @@ -154,8 +154,8 @@ public final class PatchDataTransactionUtil { private static void createDataWithinTransaction(final YangInstanceIdentifier path, final NormalizedNode payload, final EffectiveModelContext schemaContext, final RestconfTransaction transaction) { - LOG.trace("POST {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION.name(), - path, payload); + LOG.trace("POST {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION, path, + payload); transaction.create(path, payload, schemaContext); } @@ -167,7 +167,7 @@ public final class PatchDataTransactionUtil { */ private static void deleteDataWithinTransaction(final YangInstanceIdentifier path, final RestconfTransaction transaction) { - LOG.trace("Delete {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION.name(), path); + LOG.trace("Delete {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION, path); transaction.delete(path); } @@ -181,8 +181,8 @@ public final class PatchDataTransactionUtil { private static void mergeDataWithinTransaction(final YangInstanceIdentifier path, final NormalizedNode payload, final EffectiveModelContext schemaContext, final RestconfTransaction transaction) { - LOG.trace("Merge {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION.name(), - path, payload); + LOG.trace("Merge {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION, path, + payload); TransactionUtil.ensureParentsByMerge(path, schemaContext, transaction); transaction.merge(path, payload); } @@ -195,7 +195,7 @@ public final class PatchDataTransactionUtil { */ private static void removeDataWithinTransaction(final YangInstanceIdentifier path, final RestconfTransaction transaction) { - LOG.trace("Remove {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION.name(), path); + LOG.trace("Remove {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION, path); transaction.remove(path); } @@ -209,8 +209,8 @@ public final class PatchDataTransactionUtil { private static void replaceDataWithinTransaction(final YangInstanceIdentifier path, final NormalizedNode payload, final EffectiveModelContext schemaContext, final RestconfTransaction transaction) { - LOG.trace("PUT {} within Restconf Patch: {} with payload {}", - LogicalDatastoreType.CONFIGURATION.name(), path, payload); + LOG.trace("PUT {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION, path, + payload); transaction.replace(path, payload, schemaContext); } }