You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2019/12/20 09:58:07 UTC

[sling-org-apache-sling-installer-provider-jcr] branch master updated: Revert "SLING-8419 write-back configurations in JSON format"

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-provider-jcr.git


The following commit(s) were added to refs/heads/master by this push:
     new 914ef52  Revert "SLING-8419 write-back configurations in JSON format"
914ef52 is described below

commit 914ef527268860dd85082ad0c2afe86cd284b1b6
Author: Konrad Windszus <ko...@netcentric.biz>
AuthorDate: Fri Dec 20 10:57:34 2019 +0100

    Revert "SLING-8419 write-back configurations in JSON format"
    
    This reverts commit e2030671df5fa16915d1f2c216b9c9575901d031.
---
 pom.xml                                                           | 2 +-
 .../apache/sling/installer/provider/jcr/impl/JcrInstaller.java    | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index 91611d1..1ecbead 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,7 @@
             the .config files being generated by the write back feature -->
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.installer.core</artifactId>
-            <version>3.9.1-SNAPSHOT</version> 
+            <version>3.6.6</version> 
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java b/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
index 6971215..aa19d2e 100644
--- a/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
+++ b/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java
@@ -52,8 +52,6 @@ import org.apache.sling.installer.api.InstallableResource;
 import org.apache.sling.installer.api.OsgiInstaller;
 import org.apache.sling.installer.api.UpdateHandler;
 import org.apache.sling.installer.api.UpdateResult;
-import org.apache.sling.installer.api.serializer.ConfigurationSerializer;
-import org.apache.sling.installer.api.serializer.ConfigurationSerializerFactory;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.serviceusermapping.ServiceUserMapped;
 import org.apache.sling.settings.SlingSettingsService;
@@ -777,9 +775,9 @@ public class JcrInstaller implements UpdateHandler, ManagedService {
             }
 
             // write to a byte array stream
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            ConfigurationSerializer serializer = ConfigurationSerializerFactory.create(ConfigurationSerializerFactory.Format.JSON);
-            serializer.serialize(dict, baos);
+            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            baos.write("# Configuration created by Apache Sling JCR Installer\n".getBytes("UTF-8"));
+            ConfigurationHandler.write(baos, dict);
             baos.close();
 
             // get or create file node