From 300ac603c3328f29a22cb3aa2f0b1199054b24ae Mon Sep 17 00:00:00 2001 From: wildone Date: Thu, 15 Aug 2019 17:50:36 +1000 Subject: [PATCH] update sonarqube rule --- .../src/main/java/design/aem/models/v3/content/ImageImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()); }