diff --git a/aemdesign-aem-services/src/main/java/design/aem/models/v3/content/ImageImpl.java b/aemdesign-aem-services/src/main/java/design/aem/models/v3/content/ImageImpl.java index 7dc667ecd..9b36d596b 100644 --- a/aemdesign-aem-services/src/main/java/design/aem/models/v3/content/ImageImpl.java +++ b/aemdesign-aem-services/src/main/java/design/aem/models/v3/content/ImageImpl.java @@ -113,7 +113,7 @@ protected void initModel() { Asset assetBasic = assetR.adaptTo(Asset.class); - if (isNotNull(asset) && isNotNull(assetBasic)) { + if (isNotNull(asset) && assetBasic != null) { //get asset metadata String assetUID = asset.getIdentifier(); String licenseInfo = getAssetCopyrightInfo(assetBasic, getI18n().get(DEFAULT_I18N_LABEL_LICENSEINFO, DEFAULT_I18N_CATEGORY)); @@ -138,7 +138,7 @@ protected void initModel() { //ensure something is added as title String title = componentProperties.get(DAM_TITLE, ""); - if (isEmpty(title) && isNotNull(assetBasic)) { + if (isEmpty(title) && assetBasic != null) { componentProperties.put(DAM_TITLE, assetBasic.getName()); }