From aa48c864e1338e446be8f474cc34c5b2153672f5 Mon Sep 17 00:00:00 2001 From: Justin Mclean Date: Mon, 20 Jan 2025 13:43:29 +1100 Subject: [PATCH] [Minor] Optionals should not be set to null (#6276) ### What changes were proposed in this pull request? Optionals should not be set to null ### Why are the changes needed? see above Fix: # N/A ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Tested locally --- .../java/org/apache/gravitino/cli/commands/OwnerDetails.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java index 8485a587560..a815d6ba14d 100644 --- a/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java +++ b/clients/cli/src/main/java/org/apache/gravitino/cli/commands/OwnerDetails.java @@ -68,7 +68,7 @@ public OwnerDetails( /** Displays the owner of an entity. */ @Override public void handle() { - Optional owner = null; + Optional owner = Optional.empty(); MetadataObject metadata = MetadataObjects.parse(entity, entityType); try {