- Fix displayName (#16059)

This commit is contained in:
Mohit Yadav 2024-04-26 18:56:55 +05:30 committed by GitHub
parent e6a2ec147e
commit 33f1e4f4f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,6 +20,7 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.openmetadata.common.utils.CommonUtil;
import org.openmetadata.schema.entity.type.Style; import org.openmetadata.schema.entity.type.Style;
import org.openmetadata.schema.type.*; import org.openmetadata.schema.type.*;
import org.openmetadata.schema.utils.EntityInterfaceUtil; import org.openmetadata.schema.utils.EntityInterfaceUtil;
@ -189,7 +190,7 @@ public interface EntityInterface {
? EntityInterfaceUtil.quoteName(getName()) ? EntityInterfaceUtil.quoteName(getName())
: getFullyQualifiedName()) : getFullyQualifiedName())
.withDescription(getDescription()) .withDescription(getDescription())
.withDisplayName(getDisplayName()) .withDisplayName(CommonUtil.nullOrEmpty(getDisplayName()) ? getName() : getDisplayName())
.withType( .withType(
CANONICAL_ENTITY_NAME_MAP.get(this.getClass().getSimpleName().toLowerCase(Locale.ROOT))) CANONICAL_ENTITY_NAME_MAP.get(this.getClass().getSimpleName().toLowerCase(Locale.ROOT)))
.withDeleted(getDeleted()) .withDeleted(getDeleted())