From 4a43485bd853167d05c3353a2f0c780f6e96d66a Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Wed, 15 Nov 2023 21:45:54 +0100 Subject: [PATCH] Content Sync: prevent exception when creating parent nodes (#3196) * Content Sync: prevent excetion when creating parent nodes --------- Co-authored-by: david g --- CHANGELOG.md | 1 + .../com/adobe/acs/commons/contentsync/RemoteInstance.java | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 858e134934..fb8c75e9c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com) ## Added +- #3196 - Content Sync: prevent exception when creating parent nodes - #3194 - Redirect Manager: Ignore Case value is not persisting - #3147 - Allow usage of Dispatcher Flush Rules in AEMaaCS diff --git a/bundle/src/main/java/com/adobe/acs/commons/contentsync/RemoteInstance.java b/bundle/src/main/java/com/adobe/acs/commons/contentsync/RemoteInstance.java index 9b364e7e45..fd3af33f17 100644 --- a/bundle/src/main/java/com/adobe/acs/commons/contentsync/RemoteInstance.java +++ b/bundle/src/main/java/com/adobe/acs/commons/contentsync/RemoteInstance.java @@ -45,8 +45,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; - -import static javax.jcr.Property.JCR_PRIMARY_TYPE; +import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE; /** * HTTP connection to a remote AEM instance + some sugar methods to fetch data @@ -121,7 +120,7 @@ private String formatError(String uri, int statusCode, String message) { } public String getPrimaryType(String path) throws IOException, URISyntaxException { - URI uri = toURI(path + "/" + JCR_PRIMARY_TYPE); + URI uri = toURI(path + "/" + JCR_PRIMARYTYPE); String str = getString(uri); if (str.isEmpty()) { throw new IllegalStateException("It appears " + hostConfiguration.getUsername()