You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2024/12/19 14:10:30 UTC

(sling-org-apache-sling-jcr-contentloader) branch master updated (f152c13 -> d36a5e7)

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

sseifert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git


    from f152c13  SLING-12459 - Redirect sonarcloud notifications to commits@apache.sling.org
     new 22ba35d  SLING-12587 Update to parent 62
     new a0f3264  SLING-12587 apply spotless formatting
     new d36a5e7  SLING-12587 build only with java 17

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .sling-module.json                                 |   5 +
 pom.xml                                            | 146 ++--
 .../sling/jcr/contentloader/ContentCreator.java    |  35 +-
 .../jcr/contentloader/ContentImportListener.java   |  34 +-
 .../sling/jcr/contentloader/ContentImporter.java   |  25 +-
 .../sling/jcr/contentloader/ContentReader.java     |   5 +-
 .../sling/jcr/contentloader/ContentTypeUtil.java   |  11 +-
 .../sling/jcr/contentloader/ImportOptions.java     |  83 +-
 .../sling/jcr/contentloader/LocalPrivilege.java    |  40 +-
 .../sling/jcr/contentloader/LocalRestriction.java  |  23 +-
 .../apache/sling/jcr/contentloader/PathEntry.java  | 152 ++--
 .../contentloader/hc/BundleContentLoadedCheck.java |  88 ++-
 .../contentloader/internal/BaseImportLoader.java   |   6 +-
 .../internal/BundleContentLoader.java              | 161 ++--
 .../internal/BundleContentLoaderConfiguration.java |   7 +-
 .../internal/BundleContentLoaderListener.java      |  93 ++-
 .../jcr/contentloader/internal/BundleHelper.java   |  12 +-
 .../jcr/contentloader/internal/ContentHelper.java  |  12 +-
 .../internal/ContentLoaderWebConsolePlugin.java    |  89 ++-
 .../ContentReaderUnavailableException.java         |   1 -
 .../internal/ContentReaderWhiteboard.java          |  38 +-
 .../internal/ContentReaderWhiteboardListener.java  |  24 +-
 .../internal/DefaultContentCreator.java            | 359 +++++----
 .../internal/DefaultContentImporter.java           |  76 +-
 .../jcr/contentloader/internal/JcrXmlImporter.java |  13 +-
 .../contentloader/internal/readers/JsonReader.java | 188 ++---
 .../internal/readers/OrderedJsonReader.java        |  34 +-
 .../contentloader/internal/readers/XmlReader.java  |  95 +--
 .../contentloader/internal/readers/ZipReader.java  |  85 ++-
 .../sling/jcr/contentloader/package-info.java      |   1 -
 .../jcr/contentloader/ContentCreatorTest.java      |  34 +-
 .../jcr/contentloader/ImportOptionsFactory.java    |  44 +-
 .../jcr/contentloader/LocalPrivilegeTest.java      |  57 +-
 .../jcr/contentloader/LocalRestrictionTest.java    |  66 +-
 .../sling/jcr/contentloader/PathEntryTest.java     |  39 +-
 .../internal/BundleContentLoaderListenerTest.java  |  83 +-
 .../internal/BundleContentLoaderTest.java          |  94 ++-
 .../jcr/contentloader/internal/CreateNodeTest.java |  67 +-
 .../internal/DefaultContentCreatorTest.java        | 843 ++++++++++++---------
 .../jcr/contentloader/internal/JsonReaderTest.java |  53 +-
 .../jcr/contentloader/internal/SLING11203Test.java |  67 +-
 .../internal/hc/BundleContentLoadedCheckTest.java  |  15 +-
 .../internal/readers/MockContentCreator.java       |  49 +-
 .../internal/readers/OrderedJsonReaderTest.java    |  41 +-
 .../internal/readers/XmlReaderTest.java            |  46 +-
 .../internal/readers/ZipReaderTest.java            |  75 +-
 .../contentloader/it/BasicInitialContentIT.java    |  64 +-
 .../contentloader/it/ContentloaderTestSupport.java | 194 ++---
 .../jcr/contentloader/it/I18nInitialContentIT.java |  49 +-
 .../contentloader/it/OrderedInitialContentIT.java  |  33 +-
 .../it/SLING11713InitialContentIT.java             | 138 ++--
 .../it/SLING7268InitialContentIT.java              |  63 +-
 .../it/SLING8118InitialContentIT.java              |  70 +-
 53 files changed, 2357 insertions(+), 1868 deletions(-)
 create mode 100644 .sling-module.json


(sling-org-apache-sling-jcr-contentloader) 03/03: SLING-12587 build only with java 17

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d36a5e70b59ca16d132030fce5ed03730369e853
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Dec 19 14:50:52 2024 +0100

    SLING-12587 build only with java 17
---
 .sling-module.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.sling-module.json b/.sling-module.json
index cfad4d2..0419030 100644
--- a/.sling-module.json
+++ b/.sling-module.json
@@ -1,5 +1,5 @@
 {
   "jenkins": {
-    "jdks": [17, 21]
+    "jdks": [17]
   }
 }
\ No newline at end of file


(sling-org-apache-sling-jcr-contentloader) 02/03: SLING-12587 apply spotless formatting

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a0f3264e589884cce874899c1adf9a3b5ee67ad0
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Dec 19 14:15:39 2024 +0100

    SLING-12587 apply spotless formatting
---
 pom.xml                                            | 133 ++--
 .../sling/jcr/contentloader/ContentCreator.java    |  35 +-
 .../jcr/contentloader/ContentImportListener.java   |  34 +-
 .../sling/jcr/contentloader/ContentImporter.java   |  25 +-
 .../sling/jcr/contentloader/ContentReader.java     |   5 +-
 .../sling/jcr/contentloader/ContentTypeUtil.java   |  11 +-
 .../sling/jcr/contentloader/ImportOptions.java     |  83 +-
 .../sling/jcr/contentloader/LocalPrivilege.java    |  40 +-
 .../sling/jcr/contentloader/LocalRestriction.java  |  23 +-
 .../apache/sling/jcr/contentloader/PathEntry.java  | 152 ++--
 .../contentloader/hc/BundleContentLoadedCheck.java |  88 ++-
 .../contentloader/internal/BaseImportLoader.java   |   6 +-
 .../internal/BundleContentLoader.java              | 161 ++--
 .../internal/BundleContentLoaderConfiguration.java |   7 +-
 .../internal/BundleContentLoaderListener.java      |  93 ++-
 .../jcr/contentloader/internal/BundleHelper.java   |  12 +-
 .../jcr/contentloader/internal/ContentHelper.java  |  12 +-
 .../internal/ContentLoaderWebConsolePlugin.java    |  89 ++-
 .../ContentReaderUnavailableException.java         |   1 -
 .../internal/ContentReaderWhiteboard.java          |  38 +-
 .../internal/ContentReaderWhiteboardListener.java  |  24 +-
 .../internal/DefaultContentCreator.java            | 359 +++++----
 .../internal/DefaultContentImporter.java           |  76 +-
 .../jcr/contentloader/internal/JcrXmlImporter.java |  13 +-
 .../contentloader/internal/readers/JsonReader.java | 188 ++---
 .../internal/readers/OrderedJsonReader.java        |  34 +-
 .../contentloader/internal/readers/XmlReader.java  |  95 +--
 .../contentloader/internal/readers/ZipReader.java  |  85 ++-
 .../sling/jcr/contentloader/package-info.java      |   1 -
 .../jcr/contentloader/ContentCreatorTest.java      |  34 +-
 .../jcr/contentloader/ImportOptionsFactory.java    |  44 +-
 .../jcr/contentloader/LocalPrivilegeTest.java      |  57 +-
 .../jcr/contentloader/LocalRestrictionTest.java    |  66 +-
 .../sling/jcr/contentloader/PathEntryTest.java     |  39 +-
 .../internal/BundleContentLoaderListenerTest.java  |  83 +-
 .../internal/BundleContentLoaderTest.java          |  94 ++-
 .../jcr/contentloader/internal/CreateNodeTest.java |  67 +-
 .../internal/DefaultContentCreatorTest.java        | 843 ++++++++++++---------
 .../jcr/contentloader/internal/JsonReaderTest.java |  53 +-
 .../jcr/contentloader/internal/SLING11203Test.java |  67 +-
 .../internal/hc/BundleContentLoadedCheckTest.java  |  15 +-
 .../internal/readers/MockContentCreator.java       |  49 +-
 .../internal/readers/OrderedJsonReaderTest.java    |  41 +-
 .../internal/readers/XmlReaderTest.java            |  46 +-
 .../internal/readers/ZipReaderTest.java            |  75 +-
 .../contentloader/it/BasicInitialContentIT.java    |  64 +-
 .../contentloader/it/ContentloaderTestSupport.java | 194 ++---
 .../jcr/contentloader/it/I18nInitialContentIT.java |  49 +-
 .../contentloader/it/OrderedInitialContentIT.java  |  33 +-
 .../it/SLING11713InitialContentIT.java             | 138 ++--
 .../it/SLING7268InitialContentIT.java              |  63 +-
 .../it/SLING8118InitialContentIT.java              |  70 +-
 52 files changed, 2340 insertions(+), 1867 deletions(-)

diff --git a/pom.xml b/pom.xml
index 967df8f..dedbc95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,73 +34,18 @@
     <name>Apache Sling JCR ContentLoader</name>
     <description>This bundle provides initial content installation through bundles.</description>
 
-    <properties>
-        <sling.java.version>8</sling.java.version>
-        <org.ops4j.pax.exam.version>4.13.3</org.ops4j.pax.exam.version>
-        <project.build.outputTimestamp>2023-02-08T14:54:21Z</project.build.outputTimestamp>
-    </properties>
-
     <scm>
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git</connection>
-        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git
-    </developerConnection>
-        <url>https://github.com/apache/sling-org-apache-sling-jcr-contentloader.git</url>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git</developerConnection>
         <tag>org.apache.sling.jcr.contentloader-2.4.0</tag>
+        <url>https://github.com/apache/sling-org-apache-sling-jcr-contentloader.git</url>
     </scm>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.rat</groupId>
-                <artifactId>apache-rat-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>src/test/**/*.json</exclude>
-                        <exclude>src/test/**/*.ordered-json</exclude>
-                        <exclude>src/test/**/*.xml</exclude>
-                        <exclude>src/test/**/*.txt</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-failsafe-plugin</artifactId>
-                <executions>
-                   <execution>
-                       <goals>
-                           <goal>integration-test</goal>
-                           <goal>verify</goal>
-                       </goals>
-                   </execution>
-               </executions>
-                <configuration>
-                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
-                    <systemProperties>
-                        <property>
-                            <name>bundle.filename</name>
-                            <value>${basedir}/target/${project.build.finalName}.jar</value>
-                        </property>
-                    </systemProperties>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.servicemix.tooling</groupId>
-                <artifactId>depends-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-                    <excludePackageNames> org.apache.sling.jcr.contentloader.internal</excludePackageNames>
-                </configuration>
-            </plugin>
-        </plugins>
-    </reporting>
+    <properties>
+        <sling.java.version>8</sling.java.version>
+        <org.ops4j.pax.exam.version>4.13.3</org.ops4j.pax.exam.version>
+        <project.build.outputTimestamp>2023-02-08T14:54:21Z</project.build.outputTimestamp>
+    </properties>
 
     <dependencies>
         <!-- this dependency must come first to make sure Oak 1.40.0 is used for testing and not older versions being provided by other dependencies (oak-api, oak-security-spi) -->
@@ -110,7 +55,7 @@
             <version>3.1.2-1.40.0</version>
             <scope>test</scope>
         </dependency>
-    
+
         <!-- OSGi -->
         <dependency>
             <groupId>org.osgi</groupId>
@@ -193,10 +138,10 @@
             <scope>provided</scope>
             <optional>true</optional>
             <exclusions>
-              <exclusion>
-                <groupId>*</groupId>
-                <artifactId>*</artifactId>
-              </exclusion>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
@@ -415,4 +360,58 @@
         <!-- END testing dependencies -->
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>src/test/**/*.json</exclude>
+                        <exclude>src/test/**/*.ordered-json</exclude>
+                        <exclude>src/test/**/*.xml</exclude>
+                        <exclude>src/test/**/*.txt</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <configuration>
+                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                    <systemProperties>
+                        <property>
+                            <name>bundle.filename</name>
+                            <value>${basedir}/target/${project.build.finalName}.jar</value>
+                        </property>
+                    </systemProperties>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <excludePackageNames>org.apache.sling.jcr.contentloader.internal</excludePackageNames>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
+
 </project>
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/ContentCreator.java b/src/main/java/org/apache/sling/jcr/contentloader/ContentCreator.java
index daa0466..86b81b0 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/ContentCreator.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/ContentCreator.java
@@ -18,18 +18,17 @@
  */
 package org.apache.sling.jcr.contentloader;
 
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+
 import java.io.InputStream;
 import java.util.Collection;
 import java.util.Map;
 import java.util.Set;
 
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-
 import org.osgi.annotation.versioning.ProviderType;
 
-
 /**
  * The <code>ContentCreator</code> is used by the {@link org.apache.sling.jcr.contentloader.ContentReader} to create the actual content.
  *
@@ -60,14 +59,13 @@ public interface ContentCreator {
      */
     void finishNode() throws RepositoryException;
 
-    
     /**
      * Indicates that the import is finished
      *
      * @throws RepositoryException If anything goes wrong.
      */
     void finish() throws RepositoryException;
-    
+
     /**
      * Create a new property to the current node.
      *
@@ -118,7 +116,8 @@ public interface ContentCreator {
      * @param lastModified The last modified or -1
      * @throws RepositoryException If anything goes wrong.
      */
-    void createFileAndResourceNode(String name, InputStream data, String mimeType, long lastModified) throws RepositoryException;
+    void createFileAndResourceNode(String name, InputStream data, String mimeType, long lastModified)
+            throws RepositoryException;
 
     /**
      * Switch the current node to the path (which must be relative
@@ -175,7 +174,8 @@ public interface ContentCreator {
      *                          </table>
      * @throws RepositoryException If anything goes wrong.
      */
-    void createAce(String principal, String[] grantedPrivileges, String[] deniedPrivileges, String order) throws RepositoryException;
+    void createAce(String principal, String[] grantedPrivileges, String[] deniedPrivileges, String order)
+            throws RepositoryException;
 
     /**
      * Creates an Access Control Entry for the current node for the specified
@@ -201,11 +201,18 @@ public interface ContentCreator {
      * @deprecated use {@link #createAce(String, Collection, String)} instead
      */
     @Deprecated
-    default void createAce(String principal, String[] grantedPrivileges, String[] deniedPrivileges, String order, 
-            Map<String, Value> restrictions, Map<String, Value[]> mvRestrictions, Set<String> removedRestrictionNames) throws RepositoryException {
+    default void createAce(
+            String principal,
+            String[] grantedPrivileges,
+            String[] deniedPrivileges,
+            String order,
+            Map<String, Value> restrictions,
+            Map<String, Value[]> mvRestrictions,
+            Set<String> removedRestrictionNames)
+            throws RepositoryException {
         throw new UnsupportedOperationException();
     }
-    
+
     /**
      * Creates an Access Control Entry for the current node for the specified
      * principal and privileges.
@@ -224,7 +231,8 @@ public interface ContentCreator {
      *                          </table>
      * @throws RepositoryException If anything goes wrong.
      */
-    default void createAce(String principal, Collection<LocalPrivilege> privileges, String order) throws RepositoryException {
+    default void createAce(String principal, Collection<LocalPrivilege> privileges, String order)
+            throws RepositoryException {
         throw new UnsupportedOperationException();
     }
 
@@ -235,5 +243,4 @@ public interface ContentCreator {
     default Node getParent() {
         throw new UnsupportedOperationException();
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/ContentImportListener.java b/src/main/java/org/apache/sling/jcr/contentloader/ContentImportListener.java
index eca3d42..6ddc360 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/ContentImportListener.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/ContentImportListener.java
@@ -31,72 +31,72 @@ public interface ContentImportListener {
     /**
      * Content has been updated. The source path provides the path of
      * the modified Item.
-     * 
+     *
      * @param srcPath the path that was modified
      */
-	void onModify(String srcPath);
+    void onModify(String srcPath);
 
     /**
      * An Item has been deleted. The source path provides the path of the
      * deleted Item.
-     * 
+     *
      * @param srcPath the path that was deleted
      */
-	void onDelete(String srcPath);
+    void onDelete(String srcPath);
 
     /**
      * An Item has been moved to a new location. The source provides the
      * original path of the Item, the destination provides the new path of the
      * Item.
-     * 
+     *
      * @param srcPath the path that was moved
      * @param destPath the path to which the node was moved
      */
-	void onMove(String srcPath, String destPath);
+    void onMove(String srcPath, String destPath);
 
     /**
      * An Item has been copied to a new location. The source path provides the
      * path of the copied Item, the destination path provides the path of the
      * new Item.
-     * 
+     *
      * @param srcPath the path that was copied
      * @param destPath the path to which the node was copied
      */
-	void onCopy(String srcPath, String destPath);
+    void onCopy(String srcPath, String destPath);
 
     /**
      * A Node has been created. The source path provides the path of the newly
      * created Node.
-     * 
+     *
      * @param srcPath the path that was created
      */
-	void onCreate(String srcPath);
+    void onCreate(String srcPath);
 
     /**
      * A child Node has been reordered. The orderedPath provides the path of the
      * node, which has been reordered. ThebeforeSibbling provides the name of
      * the sibling node before which the source Node has been ordered.
-     * 
+     *
      * @param orderedPath the path of the node which has been reodered
      * @param beforeSibbling the name of the sibling the node was ordered before
      */
-	void onReorder(String orderedPath, String beforeSibbling);
+    void onReorder(String orderedPath, String beforeSibbling);
 
     /**
      * A versionable Node has been checked in. The source path provides the path of the
      * newly checked in Node.
-     * 
+     *
      * @param srcPath the path that was checked in
      * @since 2.1.4
      */
-	void onCheckin(String srcPath);
+    void onCheckin(String srcPath);
 
-	/**
+    /**
      * A versionable Node has been checked out. The source path provides the path of the
      * newly checked out Node.
-     * 
+     *
      * @param srcPath the path that was checked out
      * @since 2.1.4
      */
-	void onCheckout(String srcPath);
+    void onCheckout(String srcPath);
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/ContentImporter.java b/src/main/java/org/apache/sling/jcr/contentloader/ContentImporter.java
index 161a3d2..7b2951a 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/ContentImporter.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/ContentImporter.java
@@ -18,14 +18,13 @@
  */
 package org.apache.sling.jcr.contentloader;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 
-import org.osgi.annotation.versioning.ProviderType;
+import java.io.IOException;
+import java.io.InputStream;
 
+import org.osgi.annotation.versioning.ProviderType;
 
 /**
  * The <code>ContentImporter</code> service
@@ -48,7 +47,13 @@ public interface ContentImporter {
      * @throws RepositoryException If anything goes wrong accessing the JCR repository
      * @throws IOException If anything goes wrong reading or writing the content
      */
-    void importContent(Node parent, String filename, InputStream contentStream, ImportOptions importOptions, ContentImportListener importListener) throws RepositoryException, IOException;
+    void importContent(
+            Node parent,
+            String filename,
+            InputStream contentStream,
+            ImportOptions importOptions,
+            ContentImportListener importListener)
+            throws RepositoryException, IOException;
 
     /**
      * Import content into the repository by parsing the provided content stream.
@@ -62,6 +67,12 @@ public interface ContentImporter {
      * @throws RepositoryException If anything goes wrong accessing the JCR repository
      * @throws IOException If anything goes wrong reading or writing the content
      */
-    void importContent(Node parent, String name, String contentType, InputStream contentStream, ImportOptions importOptions, ContentImportListener importListener) throws RepositoryException, IOException;
-
+    void importContent(
+            Node parent,
+            String name,
+            String contentType,
+            InputStream contentStream,
+            ImportOptions importOptions,
+            ContentImportListener importListener)
+            throws RepositoryException, IOException;
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/ContentReader.java b/src/main/java/org/apache/sling/jcr/contentloader/ContentReader.java
index ec8c1aa..14163cf 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/ContentReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/ContentReader.java
@@ -18,12 +18,12 @@
  */
 package org.apache.sling.jcr.contentloader;
 
+import javax.jcr.RepositoryException;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 
-import javax.jcr.RepositoryException;
-
 import org.osgi.annotation.versioning.ConsumerType;
 
 /**
@@ -51,5 +51,4 @@ public interface ContentReader {
      * @throws IOException If anything goes wrong.
      */
     void parse(InputStream ins, ContentCreator contentCreator) throws IOException, RepositoryException;
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/ContentTypeUtil.java b/src/main/java/org/apache/sling/jcr/contentloader/ContentTypeUtil.java
index ce949f7..7eb4d89 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/ContentTypeUtil.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/ContentTypeUtil.java
@@ -47,19 +47,19 @@ public class ContentTypeUtil {
 
     public static String detectContentType(final String filename) {
         if (filename != null && !filename.isEmpty()) {
-            if ( filename.toLowerCase().endsWith(EXT_JSON) ) {
+            if (filename.toLowerCase().endsWith(EXT_JSON)) {
                 return TYPE_JSON;
             }
-            if ( filename.toLowerCase().endsWith(EXT_JCR_XML)) {
+            if (filename.toLowerCase().endsWith(EXT_JCR_XML)) {
                 return TYPE_JCR_XML;
             }
-            if ( filename.toLowerCase().endsWith(EXT_XML)) {
+            if (filename.toLowerCase().endsWith(EXT_XML)) {
                 return TYPE_XML;
             }
-            if ( filename.toLowerCase().endsWith(EXT_ZIP)) {
+            if (filename.toLowerCase().endsWith(EXT_ZIP)) {
                 return TYPE_ZIP;
             }
-            if ( filename.toLowerCase().endsWith(EXT_JAR)) {
+            if (filename.toLowerCase().endsWith(EXT_JAR)) {
                 return TYPE_JAR;
             }
         }
@@ -86,5 +86,4 @@ public class ContentTypeUtil {
         }
         return null;
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/ImportOptions.java b/src/main/java/org/apache/sling/jcr/contentloader/ImportOptions.java
index 4fc2e3e..a1c516b 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/ImportOptions.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/ImportOptions.java
@@ -27,17 +27,17 @@ import org.osgi.annotation.versioning.ConsumerType;
 @ConsumerType
 public abstract class ImportOptions {
 
-	/**
-	 * Specifies whether imported nodes should overwrite existing nodes.
-	 * NOTE: this means the existing node will be deleted and a new node
-	 * will be created in the same location.
-	 * @return true to overwrite nodes, false otherwise
-	 */
-	public abstract boolean isOverwrite();
-	
-	   /**
+    /**
+     * Specifies whether imported nodes should overwrite existing nodes.
+     * NOTE: this means the existing node will be deleted and a new node
+     * will be created in the same location.
+     * @return true to overwrite nodes, false otherwise
+     */
+    public abstract boolean isOverwrite();
+
+    /**
      * Specifies whether imported nodes should merge with existing nodes.
-     * NOTE: this means the existing nodes that are not imported will  be 
+     * NOTE: this means the existing nodes that are not imported will  be
      * deleted.
      * @return true to overwrite nodes, false otherwise
      */
@@ -45,13 +45,13 @@ public abstract class ImportOptions {
         return false;
     }
 
-	/**
-	 * Specifies whether imported properties should overwrite existing properties.
-	 * @return true to overwrite node properties, false otherwise
-	 */
-	public abstract boolean isPropertyOverwrite();
+    /**
+     * Specifies whether imported properties should overwrite existing properties.
+     * @return true to overwrite node properties, false otherwise
+     */
+    public abstract boolean isPropertyOverwrite();
 
-   /**
+    /**
      * Specifies whether imported properties should merge with existing properties.
      * NOTE: this means that properties that are not imported
      * will be removed
@@ -60,40 +60,39 @@ public abstract class ImportOptions {
     public boolean isPropertyMerge() {
         return false;
     }
-    
-	/**
-	 * Specifies whether versionable nodes is automatically checked in at the
-	 * end of the import operation.
-	 * @return true to checkin the versionable nodes, false otherwise
-	 */
-	public abstract boolean isCheckin();
 
-	/**
-	 * Specifies whether versionable nodes is automatically checked out when
-	 * necessary.
-	 * @return true to checkout the versionable nodes, false otherwise
+    /**
+     * Specifies whether versionable nodes is automatically checked in at the
+     * end of the import operation.
+     * @return true to checkin the versionable nodes, false otherwise
+     */
+    public abstract boolean isCheckin();
+
+    /**
+     * Specifies whether versionable nodes is automatically checked out when
+     * necessary.
+     * @return true to checkout the versionable nodes, false otherwise
      * @since 2.1.4
-	 */
-	public boolean isAutoCheckout() {
-		return true;
-	}
+     */
+    public boolean isAutoCheckout() {
+        return true;
+    }
 
-	/**
-	 * Check if the content reader for the given file extension should
-	 * be ignored.
-	 *
-	 * @param extension the extension to check
-	 * @return true to ignore the reader, false otherwise
-	 */
-	public abstract boolean isIgnoredImportProvider(String extension);
+    /**
+     * Check if the content reader for the given file extension should
+     * be ignored.
+     *
+     * @param extension the extension to check
+     * @return true to ignore the reader, false otherwise
+     */
+    public abstract boolean isIgnoredImportProvider(String extension);
 
     /**
-     * Check if the given entry name should require a matching registered 
+     * Check if the given entry name should require a matching registered
      * import provider.
      *
      * @param name the entry name to check
      * @return true to require an import provider, false otherwise
      */
     public abstract boolean isImportProviderRequired(@NotNull String name);
-
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/LocalPrivilege.java b/src/main/java/org/apache/sling/jcr/contentloader/LocalPrivilege.java
index 51cae09..5ea09f7 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/LocalPrivilege.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/LocalPrivilege.java
@@ -18,13 +18,13 @@
  */
 package org.apache.sling.jcr.contentloader;
 
-import java.util.Collections;
-import java.util.Set;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.Privilege;
 
+import java.util.Collections;
+import java.util.Set;
+
 public class LocalPrivilege {
     private String privilegeName;
     private boolean allow;
@@ -112,33 +112,21 @@ public class LocalPrivilege {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
+        if (this == obj) return true;
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
         LocalPrivilege other = (LocalPrivilege) obj;
-        if (allow != other.allow)
-            return false;
+        if (allow != other.allow) return false;
         if (allowRestrictions == null) {
-            if (other.allowRestrictions != null)
-                return false;
-        } else if (!allowRestrictions.equals(other.allowRestrictions))
-            return false;
-        if (deny != other.deny)
-            return false;
+            if (other.allowRestrictions != null) return false;
+        } else if (!allowRestrictions.equals(other.allowRestrictions)) return false;
+        if (deny != other.deny) return false;
         if (denyRestrictions == null) {
-            if (other.denyRestrictions != null)
-                return false;
-        } else if (!denyRestrictions.equals(other.denyRestrictions))
-            return false;
+            if (other.denyRestrictions != null) return false;
+        } else if (!denyRestrictions.equals(other.denyRestrictions)) return false;
         if (privilegeName == null) {
-            if (other.privilegeName != null)
-                return false;
-        } else if (!privilegeName.equals(other.privilegeName))
-            return false;
+            if (other.privilegeName != null) return false;
+        } else if (!privilegeName.equals(other.privilegeName)) return false;
         return true;
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/LocalRestriction.java b/src/main/java/org/apache/sling/jcr/contentloader/LocalRestriction.java
index 26a886b..c734a30 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/LocalRestriction.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/LocalRestriction.java
@@ -18,10 +18,10 @@
  */
 package org.apache.sling.jcr.contentloader;
 
-import java.util.Arrays;
-
 import javax.jcr.Value;
 
+import java.util.Arrays;
+
 import org.jetbrains.annotations.NotNull;
 
 public class LocalRestriction {
@@ -87,21 +87,14 @@ public class LocalRestriction {
 
     @Override
     public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
+        if (this == obj) return true;
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
         LocalRestriction other = (LocalRestriction) obj;
-        if (multival != other.multival)
-            return false;
+        if (multival != other.multival) return false;
         if (restriction == null) {
-            if (other.restriction != null)
-                return false;
-        } else if (!restriction.equals(other.restriction))
-            return false;
+            if (other.restriction != null) return false;
+        } else if (!restriction.equals(other.restriction)) return false;
         return Arrays.equals(values, other.values);
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/PathEntry.java b/src/main/java/org/apache/sling/jcr/contentloader/PathEntry.java
index dfe5281..75c8b81 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/PathEntry.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/PathEntry.java
@@ -57,19 +57,19 @@ public class PathEntry extends ImportOptions {
     public static final String OVERWRITE_DIRECTIVE = "overwrite";
 
     /**
-     * The overwriteProperties directive specifying if content properties 
+     * The overwriteProperties directive specifying if content properties
      * should be overwritten or just initially added.
      */
     public static final String OVERWRITE_PROPERTIES_DIRECTIVE = "overwriteProperties";
-    
+
     /**
-     * The overwriteProperties directive specifying if content properties 
+     * The overwriteProperties directive specifying if content properties
      * should be overwritten or just initially added.
      */
     public static final String MERGE_PROPERTIES_DIRECTIVE = "mergeProperties";
-    
+
     /**
-     * The overwriteProperties directive specifying if content properties 
+     * The overwriteProperties directive specifying if content properties
      * should be overwritten or just initially added.
      */
     public static final String MERGE_NODES_DIRECTIVE = "merge";
@@ -101,7 +101,7 @@ public class PathEntry extends ImportOptions {
     public static final String AUTOCHECKOUT_DIRECTIVE = "autoCheckout";
 
     /**
-     * The ignore content readers directive specifying whether the available 
+     * The ignore content readers directive specifying whether the available
      * {@link org.apache.sling.jcr.contentloader.ContentReader}s should be used during
      * content loading. This is a string value that defaults to the emptystring.
      * @since 2.0.4
@@ -109,7 +109,7 @@ public class PathEntry extends ImportOptions {
     public static final String IGNORE_CONTENT_READERS_DIRECTIVE = "ignoreImportProviders";
 
     /**
-     * The require content readers directive specifying which of the available 
+     * The require content readers directive specifying which of the available
      * {@link org.apache.sling.jcr.contentloader.ContentReader}s should exist before
      * content loading. This is a string value that defaults to the emptystring.
      * @since 2.5.2
@@ -126,22 +126,21 @@ public class PathEntry extends ImportOptions {
 
     /** All directive names which are valid for header Sling-Initial-Content */
     protected static final Set<String> VALID_DIRECTIVES = new HashSet<>(Arrays.asList(
-        OVERWRITE_DIRECTIVE,
-        OVERWRITE_PROPERTIES_DIRECTIVE,
-        MERGE_PROPERTIES_DIRECTIVE,
-        MERGE_NODES_DIRECTIVE,
-        UNINSTALL_DIRECTIVE,
-        PATH_DIRECTIVE,
-        WORKSPACE_DIRECTIVE,
-        CHECKIN_DIRECTIVE,
-        AUTOCHECKOUT_DIRECTIVE,
-        IGNORE_CONTENT_READERS_DIRECTIVE,
-        REQUIRE_CONTENT_READERS_DIRECTIVE,
-        MAVEN_MOUNT_DIRECTIVE
-    ));
+            OVERWRITE_DIRECTIVE,
+            OVERWRITE_PROPERTIES_DIRECTIVE,
+            MERGE_PROPERTIES_DIRECTIVE,
+            MERGE_NODES_DIRECTIVE,
+            UNINSTALL_DIRECTIVE,
+            PATH_DIRECTIVE,
+            WORKSPACE_DIRECTIVE,
+            CHECKIN_DIRECTIVE,
+            AUTOCHECKOUT_DIRECTIVE,
+            IGNORE_CONTENT_READERS_DIRECTIVE,
+            REQUIRE_CONTENT_READERS_DIRECTIVE,
+            MAVEN_MOUNT_DIRECTIVE));
 
     private final boolean propertyMerge;
-    
+
     private final boolean nodeMerge;
 
     /** The path for the initial content. */
@@ -161,7 +160,7 @@ public class PathEntry extends ImportOptions {
 
     /** Should versionable nodes be auto checked out when necessary? */
     private final boolean autoCheckout;
-    
+
     /** Which content readers should be ignored? @since 2.0.4 */
     private final List<String> ignoreContentReaders;
 
@@ -179,22 +178,26 @@ public class PathEntry extends ImportOptions {
 
     private long lastModified;
 
-    /** 
+    /**
      * Parses the "Sling-Initial-Content" header from the given manifest and returns the resolved PathEntries
-     * 
+     *
      * @param manifest the manifest
      * @param bundleLastModified the timestamp when the bundle has been last modified or -1 if not known
      * @return an iterator over the parsed {@code PathEntry} items or {@code null} in case no "Sling-Initial-Content" header was found in the manifest
      */
-    public static @Nullable Iterator<PathEntry> getContentPaths(@NotNull final Manifest manifest, long bundleLastModified) {
-        // convert to map of right type (Attributes has Attributes.Name as key type, not String), so simple casting won't do
-        Map<String, String> headers = manifest.getMainAttributes().entrySet().stream().collect(Collectors.toMap( e -> e.getKey().toString(),  e-> e.getValue().toString()));
+    public static @Nullable Iterator<PathEntry> getContentPaths(
+            @NotNull final Manifest manifest, long bundleLastModified) {
+        // convert to map of right type (Attributes has Attributes.Name as key type, not String), so simple casting
+        // won't do
+        Map<String, String> headers = manifest.getMainAttributes().entrySet().stream()
+                .collect(Collectors.toMap(
+                        e -> e.getKey().toString(), e -> e.getValue().toString()));
         return getContentPaths(headers, bundleLastModified);
     }
 
-    /** 
+    /**
      * Parses the "Sling-Initial-Content" header from the given bundle and returns the resolved PathEntries
-     * 
+     *
      * @param bundle the bundle
      * @return an iterator over the parsed {@code PathEntry} items or {@code null} in case no "Sling-Initial-Content" header was found in the bundle's manifest
      */
@@ -202,21 +205,23 @@ public class PathEntry extends ImportOptions {
         return getContentPaths(toMap(bundle.getHeaders()), bundle.getLastModified(), bundle.getSymbolicName());
     }
 
-    /** 
+    /**
      * Parses the "Sling-Initial-Content" header from the given headers and returns the resolved PathEntries
-     * 
+     *
      * @param headers the manifest headers
      * @param bundleLastModified the timestamp when the bundle has been last modified or -1 if not known
      * @return an iterator over the parsed {@code PathEntry} items or {@code null} in case no "Sling-Initial-Content" header was found
      */
-    public static @Nullable Iterator<PathEntry> getContentPaths(final Map<String, String> headers, long bundleLastModified) {
+    public static @Nullable Iterator<PathEntry> getContentPaths(
+            final Map<String, String> headers, long bundleLastModified) {
         return getContentPaths(headers, bundleLastModified, null);
     }
 
-    private static @Nullable Iterator<PathEntry> getContentPaths(final Map<String, String> headers, long bundleLastModified, @Nullable String bundleSymblicName) {
+    private static @Nullable Iterator<PathEntry> getContentPaths(
+            final Map<String, String> headers, long bundleLastModified, @Nullable String bundleSymblicName) {
         final List<PathEntry> entries = new ArrayList<>();
         String bundleLastModifiedStamp = headers.get("Bnd-LastModified");
-        if ( bundleLastModifiedStamp != null ) {
+        if (bundleLastModifiedStamp != null) {
             bundleLastModified = Math.min(bundleLastModified, Long.parseLong(bundleLastModifiedStamp));
         }
         final String root = headers.get(CONTENT_HEADER);
@@ -235,8 +240,7 @@ public class PathEntry extends ImportOptions {
 
     private static Map<String, String> toMap(Dictionary<String, String> dict) {
         List<String> keys = Collections.list(dict.keys());
-        return keys.stream()
-                   .collect(Collectors.toMap(Function.identity(), dict::get));
+        return keys.stream().collect(Collectors.toMap(Function.identity(), dict::get));
     }
 
     public PathEntry(ManifestHeader.Entry entry, long bundleLastModified) {
@@ -248,20 +252,30 @@ public class PathEntry extends ImportOptions {
         this.lastModified = bundleLastModified;
 
         final String logPrefix;
-        if (bundleSymbolicName != null  && !bundleSymbolicName.isEmpty()) {
+        if (bundleSymbolicName != null && !bundleSymbolicName.isEmpty()) {
             logPrefix = "Bundle '" + bundleSymbolicName + "': ";
         } else {
             logPrefix = "";
         }
         // check for attributes
         if (entry.getAttributes().length > 0 && log.isWarnEnabled()) {
-            log.warn("{}Attributes are not supported in header {} but this header used attributes '{}'. Maybe a directive (with key/value separator ':=') was meant instead?", logPrefix, CONTENT_HEADER, 
-                    Arrays.stream(entry.getAttributes()).map(attr -> attr.getName() + "=" + attr.getValue()).collect(Collectors.joining(", ")));
+            log.warn(
+                    "{}Attributes are not supported in header {} but this header used attributes '{}'. Maybe a directive (with key/value separator ':=') was meant instead?",
+                    logPrefix,
+                    CONTENT_HEADER,
+                    Arrays.stream(entry.getAttributes())
+                            .map(attr -> attr.getName() + "=" + attr.getValue())
+                            .collect(Collectors.joining(", ")));
         }
         // check for invalid directives
         for (NameValuePair directive : entry.getDirectives()) {
             if (!VALID_DIRECTIVES.contains(directive.getName())) {
-                log.warn("{}Directive '{}' not supported in header {} but it is used with value '{}'", logPrefix, directive.getName(), CONTENT_HEADER, directive.getValue());
+                log.warn(
+                        "{}Directive '{}' not supported in header {} but it is used with value '{}'",
+                        logPrefix,
+                        directive.getName(),
+                        CONTENT_HEADER,
+                        directive.getValue());
             }
         }
         // merge directive
@@ -271,7 +285,7 @@ public class PathEntry extends ImportOptions {
         } else {
             this.propertyMerge = false;
         }
-        
+
         // merge directive
         final String mergeNodes = entry.getDirectiveValue(MERGE_NODES_DIRECTIVE);
         if (mergeNodes != null) {
@@ -279,7 +293,7 @@ public class PathEntry extends ImportOptions {
         } else {
             this.nodeMerge = false;
         }
-        
+
         // overwrite directive
         final String overwriteValue = entry.getDirectiveValue(OVERWRITE_DIRECTIVE);
         if (overwriteValue != null) {
@@ -295,8 +309,7 @@ public class PathEntry extends ImportOptions {
         } else {
             this.overwriteProperties = false;
         }
-        
- 
+
         // uninstall directive
         final String uninstallValue = entry.getDirectiveValue(UNINSTALL_DIRECTIVE);
         if (uninstallValue != null) {
@@ -332,9 +345,9 @@ public class PathEntry extends ImportOptions {
         // expand directive
         this.ignoreContentReaders = new ArrayList<>();
         final String expandValue = entry.getDirectiveValue(IGNORE_CONTENT_READERS_DIRECTIVE);
-        if ( expandValue != null && expandValue.length() > 0 ) {
+        if (expandValue != null && expandValue.length() > 0) {
             final StringTokenizer st = new StringTokenizer(expandValue, ",");
-            while ( st.hasMoreTokens() ) {
+            while (st.hasMoreTokens()) {
                 this.ignoreContentReaders.add(st.nextToken());
             }
         }
@@ -342,9 +355,9 @@ public class PathEntry extends ImportOptions {
         // expand directive
         this.requireContentReaders = new ArrayList<>();
         final String requireContentReadersValue = entry.getDirectiveValue(REQUIRE_CONTENT_READERS_DIRECTIVE);
-        if ( requireContentReadersValue != null && requireContentReadersValue.length() > 0 ) {
+        if (requireContentReadersValue != null && requireContentReadersValue.length() > 0) {
             final StringTokenizer st = new StringTokenizer(requireContentReadersValue, ",");
-            while ( st.hasMoreTokens() ) {
+            while (st.hasMoreTokens()) {
                 this.requireContentReaders.add(st.nextToken());
             }
         }
@@ -357,11 +370,11 @@ public class PathEntry extends ImportOptions {
             this.workspace = null;
         }
     }
-    
+
     public long getLastModified() {
         return lastModified;
     }
-    
+
     public String getPath() {
         return this.path;
     }
@@ -404,7 +417,7 @@ public class PathEntry extends ImportOptions {
      * @see org.apache.sling.jcr.contentloader.ImportOptions#isIgnoredImportProvider(java.lang.String)
      */
     public boolean isIgnoredImportProvider(String extension) {
-        if ( extension.startsWith(".") ) {
+        if (extension.startsWith(".")) {
             extension = extension.substring(1);
         }
         return this.ignoreContentReaders.contains(extension);
@@ -419,35 +432,40 @@ public class PathEntry extends ImportOptions {
         boolean required = false;
 
         if (!this.requireContentReaders.isEmpty()) {
-            // a directive was supplied, so use a filter to check if the 
-            //  name ends with the suffix and is not listed in the ignored 
+            // a directive was supplied, so use a filter to check if the
+            //  name ends with the suffix and is not listed in the ignored
             //  import provider set
             required = this.requireContentReaders.stream()
-                            .anyMatch(suffix ->
-                                        // verify the file suffix matches
-                                        hasNameSuffix(name, suffix) &&
-                                        // and not one of the ignored providers
-                                        !isIgnoredImportProvider(suffix));
+                    .anyMatch(suffix ->
+                            // verify the file suffix matches
+                            hasNameSuffix(name, suffix)
+                                    &&
+                                    // and not one of the ignored providers
+                                    !isIgnoredImportProvider(suffix));
         }
         return required;
     }
 
     /**
      * Check if the name ends with the supplied suffix
-     * 
+     *
      * @param name the name to check
      * @param suffix the suffix to check
      * @return true if the name ends with the suffix
      */
     private boolean hasNameSuffix(String name, String suffix) {
-               // ensure neither arg is null
-        return name != null && suffix != null &&
-               // is longer than suffix
-               name.length() > suffix.length() && 
-               // ends with suffix
-               name.endsWith(suffix) &&  
-               // dot before the suffix
-               '.' == name.charAt(name.length() - suffix.length() - 1);
+        // ensure neither arg is null
+        return name != null
+                && suffix != null
+                &&
+                // is longer than suffix
+                name.length() > suffix.length()
+                &&
+                // ends with suffix
+                name.endsWith(suffix)
+                &&
+                // dot before the suffix
+                '.' == name.charAt(name.length() - suffix.length() - 1);
     }
 
     public String getTarget() {
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/hc/BundleContentLoadedCheck.java b/src/main/java/org/apache/sling/jcr/contentloader/hc/BundleContentLoadedCheck.java
index 23aeb6a..dfa5ce0 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/hc/BundleContentLoadedCheck.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/hc/BundleContentLoadedCheck.java
@@ -1,38 +1,39 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership. The SF licenses this file
+ * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader.hc;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
 import java.util.Calendar;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.regex.Pattern;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
 import org.apache.felix.hc.annotation.HealthCheckService;
 import org.apache.felix.hc.api.FormattingResultLog;
 import org.apache.felix.hc.api.HealthCheck;
 import org.apache.felix.hc.api.Result;
 import org.apache.sling.jcr.api.SlingRepository;
-import org.apache.sling.jcr.contentloader.internal.BundleHelper;
 import org.apache.sling.jcr.contentloader.PathEntry;
 import org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener;
+import org.apache.sling.jcr.contentloader.internal.BundleHelper;
 import org.apache.sling.serviceusermapping.ServiceUserMapped;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -65,20 +66,33 @@ public class BundleContentLoadedCheck implements HealthCheck {
         @AttributeDefinition(name = "Name", description = "Name of this health check")
         String hc_name() default HC_NAME; // NOSONAR
 
-        @AttributeDefinition(name = "Tags", description = "List of tags for this health check, used to select subsets of health checks for execution e.g. by a composite health check.")
+        @AttributeDefinition(
+                name = "Tags",
+                description =
+                        "List of tags for this health check, used to select subsets of health checks for execution e.g. by a composite health check.")
         String[] hc_tags() default {}; // NOSONAR
 
-        @AttributeDefinition(name = "Includes RegEx", description = "RegEx to select all relevant bundles for this check. The RegEx is matched against the symbolic name of the bundle.")
+        @AttributeDefinition(
+                name = "Includes RegEx",
+                description =
+                        "RegEx to select all relevant bundles for this check. The RegEx is matched against the symbolic name of the bundle.")
         String includesRegex() default ".*";
 
-        @AttributeDefinition(name = "Excludes RegEx", description = "Optional RegEx to exclude bundles from this check (matched against symbolic name). Allows to exclude specific bundles from selected set as produced by 'Includes RegEx'.")
+        @AttributeDefinition(
+                name = "Excludes RegEx",
+                description =
+                        "Optional RegEx to exclude bundles from this check (matched against symbolic name). Allows to exclude specific bundles from selected set as produced by 'Includes RegEx'.")
         String excludesRegex() default "";
 
-        @AttributeDefinition(name = "CRITICAL for not loaded bundles", description = "By default not loaded bundles produce warnings, if this is set to true not loaded bundles produce a CRITICAL result")
+        @AttributeDefinition(
+                name = "CRITICAL for not loaded bundles",
+                description =
+                        "By default not loaded bundles produce warnings, if this is set to true not loaded bundles produce a CRITICAL result")
         boolean useCriticalForNotLoaded() default false;
 
         @AttributeDefinition
-        String webconsole_configurationFactory_nameHint() default "Bundle content loaded includes: {includesRegex} excludes: {excludesRegex}"; // NOSONAR
+        String webconsole_configurationFactory_nameHint() default
+                "Bundle content loaded includes: {includesRegex} excludes: {excludesRegex}"; // NOSONAR
     }
 
     private BundleContext bundleContext;
@@ -106,19 +120,21 @@ public class BundleContentLoadedCheck implements HealthCheck {
         this.bundleContext = bundleContext;
         this.includesRegex = Pattern.compile(config.includesRegex());
         String excludesRegex2 = config.excludesRegex();
-        this.excludesRegex = (excludesRegex2 != null && !excludesRegex2.isEmpty()) ? Pattern.compile(excludesRegex2) : null;
+        this.excludesRegex =
+                (excludesRegex2 != null && !excludesRegex2.isEmpty()) ? Pattern.compile(excludesRegex2) : null;
         this.useCriticalForNotLoaded = config.useCriticalForNotLoaded();
-        LOG.debug("Activated bundle content loaded HC for includesRegex={} excludesRegex={}% useCriticalForNotLoaded={}", includesRegex, excludesRegex, useCriticalForNotLoaded);
+        LOG.debug(
+                "Activated bundle content loaded HC for includesRegex={} excludesRegex={}% useCriticalForNotLoaded={}",
+                includesRegex, excludesRegex, useCriticalForNotLoaded);
     }
 
-    
     @Override
     public Result execute() {
         FormattingResultLog log = new FormattingResultLog();
 
         Bundle[] bundles = this.bundleContext.getBundles();
         log.debug("Framwork has {} bundles in total", bundles.length);
- 
+
         int countExcluded = 0;
         int relevantBundlesCount = 0;
         int notLoadedCount = 0;
@@ -126,7 +142,7 @@ public class BundleContentLoadedCheck implements HealthCheck {
         Session metadataSession = null;
         try {
             metadataSession = repository.loginService(null, null);
-           
+
             for (Bundle bundle : bundles) {
                 String bundleSymbolicName = bundle.getSymbolicName();
                 boolean skip = false;
@@ -135,9 +151,10 @@ public class BundleContentLoadedCheck implements HealthCheck {
                     skip = true;
                 }
 
-                if (excludesRegex!=null && excludesRegex.matcher(bundleSymbolicName).matches()) {
+                if (excludesRegex != null
+                        && excludesRegex.matcher(bundleSymbolicName).matches()) {
                     LOG.debug("Bundle {} excluded {}", bundleSymbolicName, excludesRegex);
-                    countExcluded ++;
+                    countExcluded++;
                     skip = true;
                 }
 
@@ -153,7 +170,8 @@ public class BundleContentLoadedCheck implements HealthCheck {
                     relevantBundlesCount++;
 
                     // check if the content has already been loaded
-                    final Map<String, Object> bundleContentInfo = bundleHelper.getBundleContentInfo(metadataSession, bundle, false);
+                    final Map<String, Object> bundleContentInfo =
+                            bundleHelper.getBundleContentInfo(metadataSession, bundle, false);
 
                     // if we don't get an info, someone else is currently loading
                     if (bundleContentInfo == null) {
@@ -168,14 +186,20 @@ public class BundleContentLoadedCheck implements HealthCheck {
                         }
                     } else {
                         try {
-                            final boolean contentAlreadyLoaded = ((Boolean) bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED)).booleanValue();
+                            final boolean contentAlreadyLoaded = ((Boolean)
+                                            bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED))
+                                    .booleanValue();
                             boolean isBundleUpdated = false;
-                            Calendar lastLoadedAt = (Calendar) bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT);
+                            Calendar lastLoadedAt = (Calendar)
+                                    bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT);
                             if (lastLoadedAt != null && lastLoadedAt.getTimeInMillis() < bundle.getLastModified()) {
                                 isBundleUpdated = true;
                             }
                             if (!isBundleUpdated && contentAlreadyLoaded) {
-                                log.debug("Content of bundle is already loaded {} {}.", bundle.getBundleId(), bundleSymbolicName);
+                                log.debug(
+                                        "Content of bundle is already loaded {} {}.",
+                                        bundle.getBundleId(),
+                                        bundleSymbolicName);
                             } else {
                                 notLoadedCount++;
                                 String msg = "Not loaded bundle {} {}";
@@ -206,9 +230,12 @@ public class BundleContentLoadedCheck implements HealthCheck {
                 }
             }
         }
-                
-        String baseMsg = relevantBundlesCount + " bundles" + (!includesRegex.pattern().equals(".*") ? " for pattern " + includesRegex.pattern() : "");
-        String excludedMsg = countExcluded > 0 ? " (" + countExcluded + " excluded via pattern "+excludesRegex.pattern()+")" : "";
+
+        String baseMsg = relevantBundlesCount + " bundles"
+                + (!includesRegex.pattern().equals(".*") ? " for pattern " + includesRegex.pattern() : "");
+        String excludedMsg = countExcluded > 0
+                ? " (" + countExcluded + " excluded via pattern " + excludesRegex.pattern() + ")"
+                : "";
         if (notLoadedCount > 0) {
             log.info("Found " + notLoadedCount + " not content loaded of " + baseMsg + excludedMsg);
         } else {
@@ -217,5 +244,4 @@ public class BundleContentLoadedCheck implements HealthCheck {
 
         return new Result(log);
     }
-
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/BaseImportLoader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/BaseImportLoader.java
index 8b7de59..00182ac 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/BaseImportLoader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/BaseImportLoader.java
@@ -38,8 +38,7 @@ public abstract class BaseImportLoader extends JcrXmlImporter {
     protected ContentReaderWhiteboard contentReaderWhiteboard;
 
     // This constructor is meant to be used by the OSGi
-    protected BaseImportLoader() {
-    }
+    protected BaseImportLoader() {}
 
     // This constructor is meant to be used by non-OSGi
     protected BaseImportLoader(ContentReaderWhiteboard contentReaderWhiteboard) {
@@ -49,7 +48,8 @@ public abstract class BaseImportLoader extends JcrXmlImporter {
     public Map<String, ContentReader> getContentReaders() {
         Map<String, ContentReader> readers = new LinkedHashMap<>();
         readers.put(EXT_JCR_XML, null);
-        for (Entry<String, ContentReader> e : contentReaderWhiteboard.getReadersByExtension().entrySet()) {
+        for (Entry<String, ContentReader> e :
+                contentReaderWhiteboard.getReadersByExtension().entrySet()) {
             readers.put('.' + e.getKey(), e.getValue());
         }
         return readers;
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoader.java
index 90f55c9..d4290ea 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoader.java
@@ -18,6 +18,13 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
+import javax.jcr.Item;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.version.VersionManager;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.UnsupportedEncodingException;
@@ -41,13 +48,6 @@ import java.util.function.Predicate;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
-import javax.jcr.Item;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.version.VersionManager;
-
 import org.apache.commons.io.IOUtils;
 import org.apache.sling.jcr.contentloader.ContentReader;
 import org.apache.sling.jcr.contentloader.PathEntry;
@@ -71,20 +71,26 @@ public class BundleContentLoader extends BaseImportLoader {
 
     private final Predicate<String> pathFilter;
 
-    public BundleContentLoader(BundleHelper bundleHelper, ContentReaderWhiteboard contentReaderWhiteboard,
+    public BundleContentLoader(
+            BundleHelper bundleHelper,
+            ContentReaderWhiteboard contentReaderWhiteboard,
             BundleContentLoaderConfiguration configuration) {
         super(contentReaderWhiteboard);
         this.bundleHelper = bundleHelper;
         this.delayedBundles = new LinkedList<>();
 
-        List<Pattern> includes = Arrays
-                .stream(Optional.ofNullable(configuration).map(BundleContentLoaderConfiguration::includedTargets)
+        List<Pattern> includes = Arrays.stream(Optional.ofNullable(configuration)
+                        .map(BundleContentLoaderConfiguration::includedTargets)
                         .orElse(new String[0]))
-                .filter(Objects::nonNull).map(Pattern::compile).collect(Collectors.toList());
-        List<Pattern> excludes = Arrays
-                .stream(Optional.ofNullable(configuration).map(BundleContentLoaderConfiguration::excludedTargets)
+                .filter(Objects::nonNull)
+                .map(Pattern::compile)
+                .collect(Collectors.toList());
+        List<Pattern> excludes = Arrays.stream(Optional.ofNullable(configuration)
+                        .map(BundleContentLoaderConfiguration::excludedTargets)
                         .orElse(new String[0]))
-                .filter(Objects::nonNull).map(Pattern::compile).collect(Collectors.toList());
+                .filter(Objects::nonNull)
+                .map(Pattern::compile)
+                .collect(Collectors.toList());
         this.pathFilter = path -> {
             if (configuration == null || path == null) {
                 return true;
@@ -105,15 +111,16 @@ public class BundleContentLoader extends BaseImportLoader {
     }
 
     /**
-     * Retry loading bundles that have previously been delayed 
+     * Retry loading bundles that have previously been delayed
      * @param metadataSession the JCR Session for reading/writing metadata
      */
     public void retryDelayedBundles(final Session metadataSession) {
         // handle delayed bundles, might help now
         int currentSize = -1;
-        for (int i = delayedBundles.size(); i > 0 && currentSize != delayedBundles.size()
-                && !delayedBundles.isEmpty(); i--) {
-            for (Iterator<Bundle> di = delayedBundles.iterator(); di.hasNext();) {
+        for (int i = delayedBundles.size();
+                i > 0 && currentSize != delayedBundles.size() && !delayedBundles.isEmpty();
+                i--) {
+            for (Iterator<Bundle> di = delayedBundles.iterator(); di.hasNext(); ) {
                 Bundle delayed = di.next();
                 if (registerBundleInternal(metadataSession, delayed, true, false)) {
                     di.remove();
@@ -146,8 +153,8 @@ public class BundleContentLoader extends BaseImportLoader {
         }
     }
 
-    private boolean registerBundleInternal(final Session metadataSession, final Bundle bundle, final boolean isRetry,
-            final boolean isUpdate) {
+    private boolean registerBundleInternal(
+            final Session metadataSession, final Bundle bundle, final boolean isRetry, final boolean isUpdate) {
 
         // check if bundle has initial content
         final Iterator<PathEntry> pathIter = PathEntry.getContentPaths(bundle);
@@ -160,8 +167,8 @@ public class BundleContentLoader extends BaseImportLoader {
             bundleHelper.createRepositoryPath(metadataSession, BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
 
             // check if the content has already been loaded
-            final Map<String, Object> bundleContentInfo = bundleHelper.getBundleContentInfo(metadataSession, bundle,
-                    true);
+            final Map<String, Object> bundleContentInfo =
+                    bundleHelper.getBundleContentInfo(metadataSession, bundle, true);
 
             // if we don't get an info, someone else is currently loading
             if (bundleContentInfo == null) {
@@ -171,19 +178,20 @@ public class BundleContentLoader extends BaseImportLoader {
             boolean success = false;
             List<String> createdNodes = null;
             try {
-                final boolean contentAlreadyLoaded = ((Boolean) bundleContentInfo
-                        .get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED)).booleanValue();
+                final boolean contentAlreadyLoaded = ((Boolean)
+                                bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED))
+                        .booleanValue();
                 boolean isBundleUpdated = false;
-                Calendar lastLoadedAt = (Calendar) bundleContentInfo
-                        .get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT);
+                Calendar lastLoadedAt =
+                        (Calendar) bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT);
                 if (lastLoadedAt != null && lastLoadedAt.getTimeInMillis() < bundle.getLastModified()) {
                     isBundleUpdated = true;
                 }
                 if (!isUpdate && !isBundleUpdated && contentAlreadyLoaded) {
                     log.info("Content of bundle already loaded {}.", bundle.getSymbolicName());
                 } else {
-                    createdNodes = installContent(metadataSession, bundle, pathIter,
-                            contentAlreadyLoaded && !isBundleUpdated);
+                    createdNodes =
+                            installContent(metadataSession, bundle, pathIter, contentAlreadyLoaded && !isBundleUpdated);
                     if (isRetry) {
                         // log success of retry
                         log.info("Retrying to load initial content for bundle {} succeeded.", bundle.getSymbolicName());
@@ -237,15 +245,17 @@ public class BundleContentLoader extends BaseImportLoader {
                 }
 
                 try {
-                    uninstallContent(session, bundle,
-                            (String[]) bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_UNINSTALL_PATHS));
+                    uninstallContent(session, bundle, (String[])
+                            bundleContentInfo.get(BundleContentLoaderListener.PROPERTY_UNINSTALL_PATHS));
                     bundleHelper.contentIsUninstalled(session, bundle);
                 } finally {
                     bundleHelper.unlockBundleContentInfo(session, bundle, false, null);
                 }
             } catch (RepositoryException re) {
-                log.error("Cannot remove initial content for bundle " + bundle.getSymbolicName() + " : "
-                        + re.getMessage(), re);
+                log.error(
+                        "Cannot remove initial content for bundle " + bundle.getSymbolicName() + " : "
+                                + re.getMessage(),
+                        re);
             }
         }
     }
@@ -257,8 +267,12 @@ public class BundleContentLoader extends BaseImportLoader {
      *
      * @return If the content should be removed on uninstall, a list of top nodes
      */
-    private List<String> installContent(final Session defaultSession, final Bundle bundle,
-            final Iterator<PathEntry> pathIter, final boolean contentAlreadyLoaded) throws RepositoryException, ContentReaderUnavailableException {
+    private List<String> installContent(
+            final Session defaultSession,
+            final Bundle bundle,
+            final Iterator<PathEntry> pathIter,
+            final boolean contentAlreadyLoaded)
+            throws RepositoryException, ContentReaderUnavailableException {
 
         final List<String> createdNodes = new ArrayList<>();
         final Map<String, Session> createdSessions = new HashMap<>();
@@ -276,7 +290,9 @@ public class BundleContentLoader extends BaseImportLoader {
                 }
 
                 if (pathEntry.isOverwrite() && (pathEntry.getTarget() == null || "/".equals(pathEntry.getTarget()))) {
-                    log.error("Path {} tries to overwrite on the repository root level which is not allowed, only use overwrite with a dedicated path directive having any value but '/'", pathEntry.getPath());
+                    log.error(
+                            "Path {} tries to overwrite on the repository root level which is not allowed, only use overwrite with a dedicated path directive having any value but '/'",
+                            pathEntry.getPath());
                     skip = true;
                 }
 
@@ -298,11 +314,17 @@ public class BundleContentLoader extends BaseImportLoader {
                         targetSession = defaultSession;
                     }
 
-                    final Node targetNode = getTargetNode(targetSession, pathEntry.getTarget(), pathEntry.isOverwrite());
+                    final Node targetNode =
+                            getTargetNode(targetSession, pathEntry.getTarget(), pathEntry.isOverwrite());
 
                     if (targetNode != null) {
-                        installFromPath(bundle, pathEntry.getPath(), pathEntry, targetNode,
-                                pathEntry.isUninstall() ? createdNodes : null, contentCreator);
+                        installFromPath(
+                                bundle,
+                                pathEntry.getPath(),
+                                pathEntry,
+                                targetNode,
+                                pathEntry.isUninstall() ? createdNodes : null,
+                                contentCreator);
                     }
                 }
             }
@@ -333,7 +355,8 @@ public class BundleContentLoader extends BaseImportLoader {
 
             // finally check in versionable nodes
             for (final Node versionable : contentCreator.getVersionables()) {
-                VersionManager versionManager = versionable.getSession().getWorkspace().getVersionManager();
+                VersionManager versionManager =
+                        versionable.getSession().getWorkspace().getVersionManager();
                 versionManager.checkin(versionable.getPath());
             }
         } finally {
@@ -370,8 +393,13 @@ public class BundleContentLoader extends BaseImportLoader {
      *                      used for an uninstall
      * @throws RepositoryException
      */
-    private void installFromPath(final Bundle bundle, final String path, final PathEntry configuration,
-            final Node parent, final List<String> createdNodes, final DefaultContentCreator contentCreator)
+    private void installFromPath(
+            final Bundle bundle,
+            final String path,
+            final PathEntry configuration,
+            final Node parent,
+            final List<String> createdNodes,
+            final DefaultContentCreator contentCreator)
             throws RepositoryException, ContentReaderUnavailableException {
 
         // init content creator
@@ -387,7 +415,8 @@ public class BundleContentLoader extends BaseImportLoader {
                 log.info("install: No initial content entries at {} in bundle {}", path, bundle.getSymbolicName());
                 return;
             }
-            // we have a single file content -> this should replace the target node fully, i.e. parent is one level above
+            // we have a single file content -> this should replace the target node fully, i.e. parent is one level
+            // above
             handleFile(path, bundle, processedEntries, configuration, parent.getParent(), createdNodes, contentCreator);
             return;
         }
@@ -452,9 +481,15 @@ public class BundleContentLoader extends BaseImportLoader {
      * @param createdNodes
      * @throws RepositoryException
      */
-    private void handleFile(final String entry, final Bundle bundle, final Map<String, Node> processedEntries,
-            final PathEntry configuration, final Node parent, final List<String> createdNodes,
-            final DefaultContentCreator contentCreator) throws RepositoryException, ContentReaderUnavailableException {
+    private void handleFile(
+            final String entry,
+            final Bundle bundle,
+            final Map<String, Node> processedEntries,
+            final PathEntry configuration,
+            final Node parent,
+            final List<String> createdNodes,
+            final DefaultContentCreator contentCreator)
+            throws RepositoryException, ContentReaderUnavailableException {
 
         final URL file = bundle.getEntry(entry);
         final String name = getName(entry);
@@ -487,10 +522,11 @@ public class BundleContentLoader extends BaseImportLoader {
                 }
             } else {
                 // if we require a ContentReader for this entry but didn't find one
-                //   then throw an exception to stop processing this bundle and put 
+                //   then throw an exception to stop processing this bundle and put
                 //   it into the delayedBundles list to retry later
                 if (configuration.isImportProviderRequired(name)) {
-                    throw new ContentReaderUnavailableException(String.format("Unable to locate a required content reader for entry %s", entry));
+                    throw new ContentReaderUnavailableException(
+                            String.format("Unable to locate a required content reader for entry %s", entry));
                 } else {
                     log.debug("Can't find content reader for entry {} at {}", entry, name);
                 }
@@ -533,8 +569,13 @@ public class BundleContentLoader extends BaseImportLoader {
      * @return
      * @throws RepositoryException
      */
-    private Node createNode(Node parent, String name, URL resourceUrl, final DefaultContentCreator contentCreator,
-            PathEntry configuration) throws RepositoryException {
+    private Node createNode(
+            Node parent,
+            String name,
+            URL resourceUrl,
+            final DefaultContentCreator contentCreator,
+            PathEntry configuration)
+            throws RepositoryException {
 
         final String resourcePath = resourceUrl.getPath().toLowerCase();
         InputStream contentStream = null;
@@ -600,8 +641,13 @@ public class BundleContentLoader extends BaseImportLoader {
      * @throws IOException
      * @throws RepositoryException
      */
-    private void createFile(PathEntry configuration, Node parent, URL source, List<String> createdNodes,
-            final DefaultContentCreator contentCreator) throws IOException, RepositoryException {
+    private void createFile(
+            PathEntry configuration,
+            Node parent,
+            URL source,
+            List<String> createdNodes,
+            final DefaultContentCreator contentCreator)
+            throws IOException, RepositoryException {
 
         final String srcPath = source.getPath();
         int pos = srcPath.lastIndexOf('/');
@@ -754,8 +800,8 @@ public class BundleContentLoader extends BaseImportLoader {
                     }
                 }
             } catch (RepositoryException re) {
-                log.warn("Failure to rollback uninstalling initial content for bundle {}", bundle.getSymbolicName(),
-                        re);
+                log.warn(
+                        "Failure to rollback uninstalling initial content for bundle {}", bundle.getSymbolicName(), re);
             }
 
             for (Session session : createdSessions.values()) {
@@ -785,16 +831,16 @@ public class BundleContentLoader extends BaseImportLoader {
         public void setContentReader(ContentReader contentReader) {
             this.contentReader = contentReader;
         }
-
     }
 
     /**
      * Return the parent node descriptor (ROOT).
      */
-    private Descriptor getParentNodeDescriptor(final Bundle bundle, final String path,
-            final DefaultContentCreator contentCreator) {
+    private Descriptor getParentNodeDescriptor(
+            final Bundle bundle, final String path, final DefaultContentCreator contentCreator) {
 
-        for (Map.Entry<String, ContentReader> entry : contentCreator.getContentReaders().entrySet()) {
+        for (Map.Entry<String, ContentReader> entry :
+                contentCreator.getContentReaders().entrySet()) {
             if (entry.getValue() != null) {
                 final StringBuilder filePath = new StringBuilder(path);
                 if (!path.endsWith("/")) {
@@ -849,5 +895,4 @@ public class BundleContentLoader extends BaseImportLoader {
             return bundleHelper.getSession(workspace);
         }
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderConfiguration.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderConfiguration.java
index 1302778..0e9c43d 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderConfiguration.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderConfiguration.java
@@ -21,11 +21,14 @@ package org.apache.sling.jcr.contentloader.internal;
 import org.osgi.service.metatype.annotations.AttributeDefinition;
 import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 
-@ObjectClassDefinition(name = "%contentloader.config.name", description = "%contentloader.config.description", localization = "OSGI-INF/l10n/bundle")
+@ObjectClassDefinition(
+        name = "%contentloader.config.name",
+        description = "%contentloader.config.description",
+        localization = "OSGI-INF/l10n/bundle")
 public @interface BundleContentLoaderConfiguration {
 
     @AttributeDefinition(name = "%includedTargets.name", description = "%includedTargets.description")
-    String[] includedTargets() default { "^\\/.*$" };
+    String[] includedTargets() default {"^\\/.*$"};
 
     @AttributeDefinition(name = "%excludedTargets.name", description = "%excludedTargets.description")
     String[] excludedTargets() default {};
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListener.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListener.java
index b26012d..9737e2c 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListener.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListener.java
@@ -18,6 +18,13 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+import javax.jcr.lock.LockException;
+import javax.jcr.lock.LockManager;
+
 import java.util.Calendar;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -26,13 +33,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-import javax.jcr.lock.LockException;
-import javax.jcr.lock.LockManager;
-
 import org.apache.sling.commons.mime.MimeTypeService;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.contentloader.ContentReader;
@@ -61,11 +61,17 @@ import org.slf4j.LoggerFactory;
  * </ul>
  *
  */
-@Component(service = {BundleHelper.class}, property = { Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
-        Constants.SERVICE_DESCRIPTION
-                + "=Apache Sling Content Loader Implementation" }, immediate = true, configurationPolicy = ConfigurationPolicy.OPTIONAL)
+@Component(
+        service = {BundleHelper.class},
+        property = {
+            Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+            Constants.SERVICE_DESCRIPTION + "=Apache Sling Content Loader Implementation"
+        },
+        immediate = true,
+        configurationPolicy = ConfigurationPolicy.OPTIONAL)
 @Designate(ocd = BundleContentLoaderConfiguration.class, factory = false)
-public class BundleContentLoaderListener implements SynchronousBundleListener, BundleHelper, ContentReaderWhiteboardListener {
+public class BundleContentLoaderListener
+        implements SynchronousBundleListener, BundleHelper, ContentReaderWhiteboardListener {
 
     public static final String PROPERTY_CONTENT_LOADED = "content-loaded";
     public static final String PROPERTY_CONTENT_LOADED_AT = "content-load-time";
@@ -127,10 +133,13 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
     // SLING-11189: ensure all built-in content readers are registered before processing any bundle in this listener
     @Reference(target = "(component.name=org.apache.sling.jcr.contentloader.internal.readers.JsonReader)")
     private ContentReader mandatoryContentReader1;
+
     @Reference(target = "(component.name=org.apache.sling.jcr.contentloader.internal.readers.OrderedJsonReader)")
     private ContentReader mandatoryContentReader2;
+
     @Reference(target = "(component.name=org.apache.sling.jcr.contentloader.internal.readers.XmlReader)")
     private ContentReader mandatoryContentReader3;
+
     @Reference(target = "(component.name=org.apache.sling.jcr.contentloader.internal.readers.ZipReader)")
     private ContentReader mandatoryContentReader4;
 
@@ -189,8 +198,10 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
                     isUpdate = this.updatedBundles.remove(bundle.getSymbolicName());
                     bundleContentLoader.registerBundle(session, bundle, isUpdate);
                 } catch (Exception t) {
-                    log.error("bundleChanged: Problem loading initial content of bundle " + bundle.getSymbolicName()
-                            + " (" + bundle.getBundleId() + ")", t);
+                    log.error(
+                            "bundleChanged: Problem loading initial content of bundle " + bundle.getSymbolicName()
+                                    + " (" + bundle.getBundleId() + ")",
+                            t);
                 } finally {
                     this.ungetSession(session);
                 }
@@ -205,8 +216,10 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
                     session = this.getSession();
                     bundleContentLoader.unregisterBundle(session, bundle);
                 } catch (Exception t) {
-                    log.error("bundleChanged: Problem unloading initial content of bundle " + bundle.getSymbolicName()
-                            + " (" + bundle.getBundleId() + ")", t);
+                    log.error(
+                            "bundleChanged: Problem unloading initial content of bundle " + bundle.getSymbolicName()
+                                    + " (" + bundle.getBundleId() + ")",
+                            t);
                 } finally {
                     this.ungetSession(session);
                 }
@@ -281,15 +294,18 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
                 } else {
                     ignored++;
                 }
-
             }
 
-            log.debug("Out of {} bundles, {} were not in a suitable state for initial content loading", bundles.length,
+            log.debug(
+                    "Out of {} bundles, {} were not in a suitable state for initial content loading",
+                    bundles.length,
                     ignored);
 
         } catch (Exception t) {
-            log.error("activate: Problem while loading initial content and"
-                    + " registering mappings for existing bundles", t);
+            log.error(
+                    "activate: Problem while loading initial content and"
+                            + " registering mappings for existing bundles",
+                    t);
         } finally {
             this.ungetSession(session);
         }
@@ -299,8 +315,10 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
         try {
             bundleContentLoader.registerBundle(session, bundle, false);
         } catch (Exception t) {
-            log.error("Problem loading initial content of bundle " + bundle.getSymbolicName() + " ("
-                    + bundle.getBundleId() + ")", t);
+            log.error(
+                    "Problem loading initial content of bundle " + bundle.getSymbolicName() + " ("
+                            + bundle.getBundleId() + ")",
+                    t);
         } finally {
             if (session.hasPendingChanges()) {
                 session.refresh(false);
@@ -359,15 +377,15 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
 
     /**
      * Return the bundle content info and make an exclusive lock.
-     * 
+     *
      * @param session
      * @param bundle
      * @return The map of bundle content info or null.
      * @throws RepositoryException
      */
     @Override
-    public @Nullable Map<String, Object> getBundleContentInfo(final Session session, final Bundle bundle, boolean create)
-            throws RepositoryException {
+    public @Nullable Map<String, Object> getBundleContentInfo(
+            final Session session, final Bundle bundle, boolean create) throws RepositoryException {
         final String nodeName = bundle.getSymbolicName();
         final Node parentNode = (Node) session.getItem(BUNDLE_CONTENT_NODE);
         if (!parentNode.hasNode(nodeName)) {
@@ -386,30 +404,40 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
         }
         final Node bcNode = parentNode.getNode(nodeName);
         if (bcNode.isLocked()) {
-            this.log.debug("Node {}/{} is currently locked, unable to get BundleContentInfo.", BUNDLE_CONTENT_NODE, nodeName);
+            this.log.debug(
+                    "Node {}/{} is currently locked, unable to get BundleContentInfo.", BUNDLE_CONTENT_NODE, nodeName);
             return null;
         }
         try {
             LockManager lockManager = session.getWorkspace().getLockManager();
-            lockManager.lock(bcNode.getPath(), false, // isDeep
+            lockManager.lock(
+                    bcNode.getPath(),
+                    false, // isDeep
                     true, // isSessionScoped
                     Long.MAX_VALUE, // timeoutHint
                     null); // ownerInfo
         } catch (LockException le) {
-            this.log.debug("Unable to lock node {}/{}, unable to get BundleContentInfo.", BUNDLE_CONTENT_NODE, nodeName, le);
+            this.log.debug(
+                    "Unable to lock node {}/{}, unable to get BundleContentInfo.", BUNDLE_CONTENT_NODE, nodeName, le);
             return null;
         }
         final Map<String, Object> info = new HashMap<>();
         if (bcNode.hasProperty(PROPERTY_CONTENT_LOADED_AT)) {
-            info.put(PROPERTY_CONTENT_LOADED_AT, bcNode.getProperty(PROPERTY_CONTENT_LOADED_AT).getDate());
+            info.put(
+                    PROPERTY_CONTENT_LOADED_AT,
+                    bcNode.getProperty(PROPERTY_CONTENT_LOADED_AT).getDate());
         }
         if (bcNode.hasProperty(PROPERTY_CONTENT_LOADED)) {
-            info.put(PROPERTY_CONTENT_LOADED, bcNode.getProperty(PROPERTY_CONTENT_LOADED).getBoolean());
+            info.put(
+                    PROPERTY_CONTENT_LOADED,
+                    bcNode.getProperty(PROPERTY_CONTENT_LOADED).getBoolean());
         } else {
             info.put(PROPERTY_CONTENT_LOADED, false);
         }
         if (bcNode.hasProperty(PROPERTY_CONTENT_LOADED_BY)) {
-            info.put(PROPERTY_CONTENT_LOADED_BY, bcNode.getProperty(PROPERTY_CONTENT_LOADED_BY).getString());
+            info.put(
+                    PROPERTY_CONTENT_LOADED_BY,
+                    bcNode.getProperty(PROPERTY_CONTENT_LOADED_BY).getString());
         }
         if (bcNode.hasProperty(PROPERTY_UNINSTALL_PATHS)) {
             final Value[] values = bcNode.getProperty(PROPERTY_UNINSTALL_PATHS).getValues();
@@ -423,8 +451,9 @@ public class BundleContentLoaderListener implements SynchronousBundleListener, B
     }
 
     @Override
-    public void unlockBundleContentInfo(final Session session, final Bundle bundle, final boolean contentLoaded,
-            final List<String> createdNodes) throws RepositoryException {
+    public void unlockBundleContentInfo(
+            final Session session, final Bundle bundle, final boolean contentLoaded, final List<String> createdNodes)
+            throws RepositoryException {
         final String nodeName = bundle.getSymbolicName();
         final Node parentNode = (Node) session.getItem(BUNDLE_CONTENT_NODE);
         final Node bcNode = parentNode.getNode(nodeName);
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleHelper.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleHelper.java
index 9c24695..d9e2031 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleHelper.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/BundleHelper.java
@@ -18,26 +18,26 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import java.util.List;
-import java.util.Map;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import java.util.List;
+import java.util.Map;
+
 import org.osgi.framework.Bundle;
 
 public interface BundleHelper extends ContentHelper {
 
     Map<String, Object> getBundleContentInfo(Session session, Bundle bundle, boolean create) throws RepositoryException;
 
-    void unlockBundleContentInfo(Session session, Bundle bundle, boolean contentLoaded, List<String> createdNodes)throws RepositoryException;
+    void unlockBundleContentInfo(Session session, Bundle bundle, boolean contentLoaded, List<String> createdNodes)
+            throws RepositoryException;
 
     void contentIsUninstalled(Session session, Bundle bundle);
 
     void createRepositoryPath(Session session, String path) throws RepositoryException;
 
     Session getSession() throws RepositoryException;
-    
-    Session getSession(String workspace) throws RepositoryException;
 
+    Session getSession(String workspace) throws RepositoryException;
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentHelper.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentHelper.java
index ee047d1..63b3be9 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentHelper.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentHelper.java
@@ -18,17 +18,15 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-
 /**
  * Interface to provide helpers for the ContentCreator
  *
  */
 public interface ContentHelper {
 
-	/**
-	 * Returns the MIME type from the MimeTypeService for the given name
-	 * @param name the name of the file to get the mimeType for  
-	 */
-	String getMimeType(String name);
-
+    /**
+     * Returns the MIME type from the MimeTypeService for the given name
+     * @param name the name of the file to get the mimeType for
+     */
+    String getMimeType(String name);
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderWebConsolePlugin.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderWebConsolePlugin.java
index 28e30fe..fea75e5 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderWebConsolePlugin.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentLoaderWebConsolePlugin.java
@@ -18,6 +18,12 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.servlet.GenericServlet;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.net.URL;
@@ -30,12 +36,6 @@ import java.util.Spliterators;
 import java.util.stream.Collectors;
 import java.util.stream.StreamSupport;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.servlet.GenericServlet;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
 import org.apache.sling.api.request.ResponseUtil;
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.jcr.api.SlingRepository;
@@ -47,15 +47,16 @@ import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Reference;
 
-@Component(service=javax.servlet.Servlet.class,
-    property = {
-        Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
-        Constants.SERVICE_DESCRIPTION + "=Apache Sling JCR Content Loader Web Console Plugin",
-        "felix.webconsole.label=" + ContentLoaderWebConsolePlugin.LABEL,
-        "felix.webconsole.title=JCR Content Loader",
-        "felix.webconsole.category=Sling",
-        "felix.webconsole.css=" + ContentLoaderWebConsolePlugin.RES_LOC + "main.css"
-    })
+@Component(
+        service = javax.servlet.Servlet.class,
+        property = {
+            Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+            Constants.SERVICE_DESCRIPTION + "=Apache Sling JCR Content Loader Web Console Plugin",
+            "felix.webconsole.label=" + ContentLoaderWebConsolePlugin.LABEL,
+            "felix.webconsole.title=JCR Content Loader",
+            "felix.webconsole.category=Sling",
+            "felix.webconsole.css=" + ContentLoaderWebConsolePlugin.RES_LOC + "main.css"
+        })
 @SuppressWarnings("serial")
 public class ContentLoaderWebConsolePlugin extends GenericServlet {
 
@@ -76,8 +77,7 @@ public class ContentLoaderWebConsolePlugin extends GenericServlet {
     }
 
     @Override
-    public void service(final ServletRequest req, final ServletResponse res)
-            throws IOException {
+    public void service(final ServletRequest req, final ServletResponse res) throws IOException {
         Session session = null;
         PrintWriter pw = res.getWriter();
         try {
@@ -85,7 +85,8 @@ public class ContentLoaderWebConsolePlugin extends GenericServlet {
             pw.print("<p class='statline ui-state-highlight'>Apache Sling JCR Content Loader");
             pw.print("</p>");
             pw.println("<table class='nicetable'><thead>");
-            pw.println("<tr><th>Bundle</th><th>Path Entries</th><th>Content Loaded Successfully?</th><th>Uninstall Paths (format: JCR workspace:path)</th></tr>");
+            pw.println(
+                    "<tr><th>Bundle</th><th>Path Entries</th><th>Content Loaded Successfully?</th><th>Uninstall Paths (format: JCR workspace:path)</th></tr>");
             pw.println("</thead><tbody>");
             int bundleNo = 1;
             for (final Bundle bundle : context.getBundles()) {
@@ -105,17 +106,20 @@ public class ContentLoaderWebConsolePlugin extends GenericServlet {
         }
     }
 
-    void printBundleInfoTableRow(PrintWriter pw, final ServletRequest req, Session session, Bundle bundle, boolean isEven) throws RepositoryException {
+    void printBundleInfoTableRow(
+            PrintWriter pw, final ServletRequest req, Session session, Bundle bundle, boolean isEven)
+            throws RepositoryException {
         Map<String, Object> contentInfoMap = bundleHelper.getBundleContentInfo(session, bundle, false);
         // release lock as early as possible
         bundleHelper.unlockBundleContentInfo(session, bundle, false, null);
-        
-        String[] uninstallPaths = (String[])contentInfoMap.get(BundleContentLoaderListener.PROPERTY_UNINSTALL_PATHS);
+
+        String[] uninstallPaths = (String[]) contentInfoMap.get(BundleContentLoaderListener.PROPERTY_UNINSTALL_PATHS);
         final String uninstallPathsString;
         if (uninstallPaths == null) {
             uninstallPathsString = "-";
         } else {
-            uninstallPathsString = Arrays.stream(uninstallPaths).map(ResponseUtil::escapeXml).collect(Collectors.joining("<br/>"));
+            uninstallPathsString =
+                    Arrays.stream(uninstallPaths).map(ResponseUtil::escapeXml).collect(Collectors.joining("<br/>"));
         }
         Object loadedDate = contentInfoMap.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT);
         final String loadedDetails;
@@ -123,22 +127,31 @@ public class ContentLoaderWebConsolePlugin extends GenericServlet {
             loadedDetails = "?";
         } else {
             Calendar calendar = Calendar.class.cast(loadedDate);
-            String formatterDate = DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(calendar.getTimeZone().toZoneId()).withLocale(req.getLocale())
+            String formatterDate = DateTimeFormatter.ISO_ZONED_DATE_TIME
+                    .withZone(calendar.getTimeZone().toZoneId())
+                    .withLocale(req.getLocale())
                     .format(calendar.toInstant());
-            String loadedBy = String.valueOf(contentInfoMap.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_BY));
+            String loadedBy =
+                    String.valueOf(contentInfoMap.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_BY));
             loadedDetails = String.format("%s<br/>by Sling ID %s", formatterDate, ResponseUtil.escapeXml(loadedBy));
         }
         // https://felix.apache.org/documentation/subprojects/apache-felix-web-console/extending-the-apache-felix-web-console/providing-web-console-plugins.html
         String bundleLink = req.getAttribute("felix.webconsole.appRoot") + "/bundles/" + bundle.getBundleId();
-        String pathEntriesString = StreamSupport.stream(Spliterators.spliteratorUnknownSize(PathEntry.getContentPaths(bundle), Spliterator.ORDERED), false)
-                .map(ContentLoaderWebConsolePlugin::printPathEntryTable).collect(Collectors.joining("\n"));
+        String pathEntriesString = StreamSupport.stream(
+                        Spliterators.spliteratorUnknownSize(PathEntry.getContentPaths(bundle), Spliterator.ORDERED),
+                        false)
+                .map(ContentLoaderWebConsolePlugin::printPathEntryTable)
+                .collect(Collectors.joining("\n"));
         String trClass = (isEven ? "even" : "odd") + " ui-state-default";
-        pw.printf("<tr class='%s'><td><a href=\"%s\">%s (%d)</a></td><td>%s</td><td>%s<br/><br/>(%s)</td><td>%s</td></tr>",
+        pw.printf(
+                "<tr class='%s'><td><a href=\"%s\">%s (%d)</a></td><td>%s</td><td>%s<br/><br/>(%s)</td><td>%s</td></tr>",
                 trClass,
                 bundleLink,
-                ResponseUtil.escapeXml(bundle.getSymbolicName()), bundle.getBundleId(),
+                ResponseUtil.escapeXml(bundle.getSymbolicName()),
+                bundle.getBundleId(),
                 pathEntriesString,
-                PropertiesUtil.toBoolean(contentInfoMap.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED), false),
+                PropertiesUtil.toBoolean(
+                        contentInfoMap.get(BundleContentLoaderListener.PROPERTY_CONTENT_LOADED), false),
                 loadedDetails,
                 uninstallPathsString);
     }
@@ -147,20 +160,32 @@ public class ContentLoaderWebConsolePlugin extends GenericServlet {
         StringBuilder sb = new StringBuilder();
         int row = 1;
         sb.append("<table class='nicetable nested'><thead>");
-        sb.append("<tr><th>Path</th><th>").append(ResponseUtil.escapeXml(entry.getPath())).append("</th><tr>");
+        sb.append("<tr><th>Path</th><th>")
+                .append(ResponseUtil.escapeXml(entry.getPath()))
+                .append("</th><tr>");
         sb.append("</thead><tbody>");
         printPathEntryTableRow(sb, "Target Path", ResponseUtil.escapeXml(entry.getTarget()), row++);
         // most important directives
         printPathEntryTableRow(sb, "Overwrite", Boolean.toString(entry.isOverwrite()), row++);
         printPathEntryTableRow(sb, "Uninstall", Boolean.toString(entry.isUninstall()), row++);
-        printPathEntryTableRow(sb, "Ignored Content Readers", ResponseUtil.escapeXml(String.join(", ", entry.getIgnoredContentReaders())), row);
+        printPathEntryTableRow(
+                sb,
+                "Ignored Content Readers",
+                ResponseUtil.escapeXml(String.join(", ", entry.getIgnoredContentReaders())),
+                row);
         sb.append("</tbody></table>");
         return sb.toString();
     }
 
     static void printPathEntryTableRow(StringBuilder sb, String name, String value, int i) {
         String trClass = (i % 2 == 0 ? "even" : "odd") + " ui-state-default";
-        sb.append("<tr class='").append(trClass).append("'><td>").append(name).append("</td><td>").append(value).append("</td></tr>");
+        sb.append("<tr class='")
+                .append(trClass)
+                .append("'><td>")
+                .append(name)
+                .append("</td><td>")
+                .append(value)
+                .append("</td></tr>");
     }
 
     /**
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderUnavailableException.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderUnavailableException.java
index 0396d8e..65d5f7e 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderUnavailableException.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderUnavailableException.java
@@ -28,5 +28,4 @@ class ContentReaderUnavailableException extends Exception {
     public ContentReaderUnavailableException(String message) {
         super(message);
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboard.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboard.java
index 0cbbac5..aa03241 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboard.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboard.java
@@ -1,16 +1,21 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
 package org.apache.sling.jcr.contentloader.internal;
 
 import java.util.LinkedHashMap;
@@ -24,10 +29,9 @@ import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.component.annotations.ReferenceCardinality;
 import org.osgi.service.component.annotations.ReferencePolicy;
 
-@Component(service = ContentReaderWhiteboard.class,
-    property = {
-        Constants.SERVICE_VENDOR + "=The Apache Software Foundation"
-    })
+@Component(
+        service = ContentReaderWhiteboard.class,
+        property = {Constants.SERVICE_VENDOR + "=The Apache Software Foundation"})
 public class ContentReaderWhiteboard {
 
     private ContentReaderWhiteboardListener listener;
@@ -39,6 +43,7 @@ public class ContentReaderWhiteboard {
     public void setListener(ContentReaderWhiteboardListener listener) {
         this.listener = listener;
     }
+
     public void removeListener() {
         setListener(null);
     }
@@ -51,8 +56,11 @@ public class ContentReaderWhiteboard {
         return readersByType;
     }
 
-    @Reference(name = "contentReader", service = ContentReader.class,
-            cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC)
+    @Reference(
+            name = "contentReader",
+            service = ContentReader.class,
+            cardinality = ReferenceCardinality.MULTIPLE,
+            policy = ReferencePolicy.DYNAMIC)
     protected void bindContentReader(final ContentReader operation, final Map<String, Object> properties) {
         final String[] extensions = PropertiesUtil.toStringArray(properties.get(ContentReader.PROPERTY_EXTENSIONS));
         final String[] types = PropertiesUtil.toStringArray(properties.get(ContentReader.PROPERTY_TYPES));
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboardListener.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboardListener.java
index f572501..1a28dfc 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboardListener.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/ContentReaderWhiteboardListener.java
@@ -1,16 +1,21 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the
- * NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF
- * licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
 package org.apache.sling.jcr.contentloader.internal;
 
 import org.apache.sling.jcr.contentloader.ContentReader;
@@ -22,5 +27,4 @@ import org.apache.sling.jcr.contentloader.ContentReader;
 public interface ContentReaderWhiteboardListener {
 
     void handleContentReaderAdded(final ContentReader operation);
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreator.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreator.java
index 186924f..eb7c9c4 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreator.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreator.java
@@ -18,6 +18,26 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
+import javax.jcr.Binary;
+import javax.jcr.Item;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.Property;
+import javax.jcr.PropertyIterator;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlList;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.AccessControlPolicyIterator;
+import javax.jcr.security.Privilege;
+import javax.jcr.version.VersionManager;
+
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
 import java.security.MessageDigest;
@@ -43,26 +63,6 @@ import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 import java.util.stream.StreamSupport;
 
-import javax.jcr.Binary;
-import javax.jcr.Item;
-import javax.jcr.ItemNotFoundException;
-import javax.jcr.Node;
-import javax.jcr.NodeIterator;
-import javax.jcr.Property;
-import javax.jcr.PropertyIterator;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.Value;
-import javax.jcr.ValueFactory;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlList;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.AccessControlPolicyIterator;
-import javax.jcr.security.Privilege;
-import javax.jcr.version.VersionManager;
-
 import org.apache.jackrabbit.api.security.JackrabbitAccessControlList;
 import org.apache.jackrabbit.api.security.principal.PrincipalManager;
 import org.apache.jackrabbit.api.security.user.Authorizable;
@@ -175,12 +175,15 @@ public class DefaultContentCreator implements ContentCreator {
      * @param createdNodes
      *            Optional list to store new nodes (for uninstall)
      */
-    public void init(final ImportOptions options, final Map<String, ContentReader> defaultContentReaders,
-            final List<String> createdNodes, final ContentImportListener importListener) {
+    public void init(
+            final ImportOptions options,
+            final Map<String, ContentReader> defaultContentReaders,
+            final List<String> createdNodes,
+            final ContentImportListener importListener) {
         this.configuration = options;
         // create list of allowed content readers
         this.contentReaders = new HashMap<>();
-        defaultContentReaders.forEach((key,value)->{
+        defaultContentReaders.forEach((key, value) -> {
             if (!configuration.isIgnoredImportProvider(key)) {
                 contentReaders.put(key, value);
             }
@@ -296,9 +299,9 @@ public class DefaultContentCreator implements ContentCreator {
                     }
                 }
             }
-            
+
             importedNodes.add(node.getPath());
-            
+
             // check if node is versionable
             final boolean addToVersionables = this.configuration.isCheckin() && node.isNodeType("mix:versionable");
             if (addToVersionables) {
@@ -321,7 +324,9 @@ public class DefaultContentCreator implements ContentCreator {
         final Node node = this.parentNodeStack.peek();
         // check if the property already exists and isPropertyOverwrite() is false,
         // don't overwrite it in this case
-        if (node.hasProperty(name) && !this.configuration.isPropertyOverwrite() && !node.getProperty(name).isNew()) {
+        if (node.hasProperty(name)
+                && !this.configuration.isPropertyOverwrite()
+                && !node.getProperty(name).isNew()) {
             return;
         }
 
@@ -371,7 +376,9 @@ public class DefaultContentCreator implements ContentCreator {
         final Node node = this.parentNodeStack.peek();
         // check if the property already exists and isPropertyOverwrite() is false,
         // don't overwrite it in this case
-        if (node.hasProperty(name) && !this.configuration.isPropertyOverwrite() && !node.getProperty(name).isNew()) {
+        if (node.hasProperty(name)
+                && !this.configuration.isPropertyOverwrite()
+                && !node.getProperty(name).isNew()) {
             return;
         }
         if (propertyType == PropertyType.REFERENCE) {
@@ -382,8 +389,7 @@ public class DefaultContentCreator implements ContentCreator {
             for (int i = 0; i < values.length; i++) {
                 uuids[i] = getUUID(node.getSession(), propPath, getAbsPath(node, values[i]));
                 uuidOrPaths[i] = uuids[i] != null ? uuids[i] : getAbsPath(node, values[i]);
-                if (uuids[i] == null)
-                    hasAll = false;
+                if (uuids[i] == null) hasAll = false;
             }
             checkoutIfNecessary(node);
             node.setProperty(name, uuids, propertyType);
@@ -476,7 +482,7 @@ public class DefaultContentCreator implements ContentCreator {
         if (configuration.isPropertyMerge()) {
             PropertyIterator it = node.getProperties();
             while (it.hasNext()) {
-                Property prop= it.nextProperty();
+                Property prop = it.nextProperty();
                 String propertyName = prop.getName();
                 if (appliedSet.contains(propertyName)) {
                     continue;
@@ -552,7 +558,8 @@ public class DefaultContentCreator implements ContentCreator {
             Node parentNode = getParentNode(session, property);
             if (parentNode != null) {
                 checkoutIfNecessary(parentNode);
-                if (parentNode.hasProperty(name) && parentNode.getProperty(name).getDefinition().isMultiple()) {
+                if (parentNode.hasProperty(name)
+                        && parentNode.getProperty(name).getDefinition().isMultiple()) {
                     boolean hasAll = true;
                     String[] uuidOrPaths = delayedMultipleReferences.get(property);
                     String[] uuids = new String[uuidOrPaths.length];
@@ -572,7 +579,8 @@ public class DefaultContentCreator implements ContentCreator {
                     }
                     parentNode.setProperty(name, uuids, PropertyType.REFERENCE);
                     if (this.importListener != null) {
-                        this.importListener.onCreate(parentNode.getProperty(name).getPath());
+                        this.importListener.onCreate(
+                                parentNode.getProperty(name).getPath());
                     }
                     if (hasAll) {
                         delayedMultipleReferences.remove(property);
@@ -580,7 +588,8 @@ public class DefaultContentCreator implements ContentCreator {
                 } else {
                     parentNode.setProperty(name, uuid, PropertyType.REFERENCE);
                     if (this.importListener != null) {
-                        this.importListener.onCreate(parentNode.getProperty(name).getPath());
+                        this.importListener.onCreate(
+                                parentNode.getProperty(name).getPath());
                     }
                 }
             }
@@ -695,13 +704,17 @@ public class DefaultContentCreator implements ContentCreator {
             this.parentNodeStack.push(contentNode);
             long nodeLastModified = 0L;
             if (contentNode.hasProperty(JCR_LAST_MODIFIED)) {
-                nodeLastModified = contentNode.getProperty(JCR_LAST_MODIFIED).getDate().getTimeInMillis();
+                nodeLastModified =
+                        contentNode.getProperty(JCR_LAST_MODIFIED).getDate().getTimeInMillis();
             }
             if (!this.configuration.isOverwrite() && nodeLastModified >= lastModified) {
                 return;
             }
-            log.debug("Updating {} lastModified:{} New Content LastModified:{}", parentNode.getNode(name).getPath(),
-                    new Date(nodeLastModified), new Date(lastModified));
+            log.debug(
+                    "Updating {} lastModified:{} New Content LastModified:{}",
+                    parentNode.getNode(name).getPath(),
+                    new Date(nodeLastModified),
+                    new Date(lastModified));
         } else {
             this.createNode(name, "nt:file", null);
             this.createNode("jcr:content", "nt:resource", null);
@@ -756,7 +769,7 @@ public class DefaultContentCreator implements ContentCreator {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.sling.jcr.contentloader.ContentCreator#createGroup(java.lang.
      * String, java.lang.String[], java.util.Map)
      */
@@ -801,7 +814,7 @@ public class DefaultContentCreator implements ContentCreator {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.sling.jcr.contentloader.ContentCreator#createUser(java.lang.
      * String, java.lang.String, java.util.Map)
      */
@@ -850,40 +863,41 @@ public class DefaultContentCreator implements ContentCreator {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.apache.sling.jcr.contentloader.ContentCreator#createAce(java.lang.String,
      * java.lang.String, java.lang.String[], java.lang.String[])
      */
-    public void createAce(String principalId, String[] grantedPrivilegeNames, String[] deniedPrivilegeNames,
-            String order) throws RepositoryException {
-        Map<String, LocalPrivilege> privilegeToLocalPrivilegesMap = toLocalPrivileges(grantedPrivilegeNames,
-                deniedPrivilegeNames);
+    public void createAce(
+            String principalId, String[] grantedPrivilegeNames, String[] deniedPrivilegeNames, String order)
+            throws RepositoryException {
+        Map<String, LocalPrivilege> privilegeToLocalPrivilegesMap =
+                toLocalPrivileges(grantedPrivilegeNames, deniedPrivilegeNames);
 
         createAce(principalId, new ArrayList<>(privilegeToLocalPrivilegesMap.values()), order);
     }
 
     /**
      * Convert the privilege names to LocalPrivileges
-     * 
+     *
      * @param grantedPrivilegeNames the granted privileges
      * @param deniedPrivilegeNames the denied privileges
      * @return map of privilege names to LocalPrivilege data
      */
-    protected Map<String, LocalPrivilege> toLocalPrivileges(String[] grantedPrivilegeNames,
-            String[] deniedPrivilegeNames) {
+    protected Map<String, LocalPrivilege> toLocalPrivileges(
+            String[] grantedPrivilegeNames, String[] deniedPrivilegeNames) {
         // first start with an empty map
         Map<String, LocalPrivilege> privilegeToLocalPrivilegesMap = new LinkedHashMap<>();
 
         if (grantedPrivilegeNames != null) {
-            for (String pn: grantedPrivilegeNames) {
+            for (String pn : grantedPrivilegeNames) {
                 LocalPrivilege lp = privilegeToLocalPrivilegesMap.computeIfAbsent(pn, LocalPrivilege::new);
                 lp.setAllow(true);
             }
         }
 
         if (deniedPrivilegeNames != null) {
-            for (String pn: deniedPrivilegeNames) {
+            for (String pn : deniedPrivilegeNames) {
                 LocalPrivilege lp = privilegeToLocalPrivilegesMap.computeIfAbsent(pn, LocalPrivilege::new);
                 lp.setDeny(true);
             }
@@ -896,28 +910,34 @@ public class DefaultContentCreator implements ContentCreator {
      */
     @Deprecated
     @Override
-    public void createAce(String principalId, String[] grantedPrivilegeNames, String[] deniedPrivilegeNames,
-            String order, Map<String, Value> restrictions, Map<String, Value[]> mvRestrictions,
-            Set<String> removedRestrictionNames) throws RepositoryException {
-        Map<String, LocalPrivilege> privilegeToLocalPrivilegesMap = toLocalPrivileges(grantedPrivilegeNames,
-                deniedPrivilegeNames);
+    public void createAce(
+            String principalId,
+            String[] grantedPrivilegeNames,
+            String[] deniedPrivilegeNames,
+            String order,
+            Map<String, Value> restrictions,
+            Map<String, Value[]> mvRestrictions,
+            Set<String> removedRestrictionNames)
+            throws RepositoryException {
+        Map<String, LocalPrivilege> privilegeToLocalPrivilegesMap =
+                toLocalPrivileges(grantedPrivilegeNames, deniedPrivilegeNames);
 
         Set<LocalRestriction> restrictionsSet = new HashSet<>();
         if (restrictions != null) {
-            for (Entry<String, Value> entry: restrictions.entrySet()) {
+            for (Entry<String, Value> entry : restrictions.entrySet()) {
                 LocalRestriction lr = new LocalRestriction(entry.getKey(), entry.getValue());
                 restrictionsSet.add(lr);
             }
         }
         if (mvRestrictions != null) {
-            for (Entry<String, Value[]> entry: mvRestrictions.entrySet()) {
+            for (Entry<String, Value[]> entry : mvRestrictions.entrySet()) {
                 LocalRestriction lr = new LocalRestriction(entry.getKey(), entry.getValue());
                 restrictionsSet.add(lr);
             }
         }
 
         if (!restrictionsSet.isEmpty()) {
-            for (LocalPrivilege entry: privilegeToLocalPrivilegesMap.values()) {
+            for (LocalPrivilege entry : privilegeToLocalPrivilegesMap.values()) {
                 if (entry.isAllow()) {
                     entry.setAllowRestrictions(restrictionsSet);
                 }
@@ -959,7 +979,7 @@ public class DefaultContentCreator implements ContentCreator {
 
         // validate that the privilege names are valid
         AccessControlManager acm = AccessControlUtil.getAccessControlManager(jcrSession);
-        for (LocalPrivilege localPrivilege: privileges) {
+        for (LocalPrivilege localPrivilege : privileges) {
             localPrivilege.checkPrivilege(acm);
         }
 
@@ -968,13 +988,15 @@ public class DefaultContentCreator implements ContentCreator {
         // build a list of each of the LocalPrivileges that have the same restrictions
         Map<Set<LocalRestriction>, List<LocalPrivilege>> allowRestrictionsToLocalPrivilegesMap = new HashMap<>();
         Map<Set<LocalRestriction>, List<LocalPrivilege>> denyRestrictionsToLocalPrivilegesMap = new HashMap<>();
-        for (LocalPrivilege localPrivilege: privileges) {
+        for (LocalPrivilege localPrivilege : privileges) {
             if (localPrivilege.isAllow()) {
-                List<LocalPrivilege> list = allowRestrictionsToLocalPrivilegesMap.computeIfAbsent(localPrivilege.getAllowRestrictions(), key -> new ArrayList<>());
+                List<LocalPrivilege> list = allowRestrictionsToLocalPrivilegesMap.computeIfAbsent(
+                        localPrivilege.getAllowRestrictions(), key -> new ArrayList<>());
                 list.add(localPrivilege);
             }
             if (localPrivilege.isDeny()) {
-                List<LocalPrivilege> list = denyRestrictionsToLocalPrivilegesMap.computeIfAbsent(localPrivilege.getDenyRestrictions(), key -> new ArrayList<>());
+                List<LocalPrivilege> list = denyRestrictionsToLocalPrivilegesMap.computeIfAbsent(
+                        localPrivilege.getDenyRestrictions(), key -> new ArrayList<>());
                 list.add(localPrivilege);
             }
         }
@@ -987,9 +1009,22 @@ public class DefaultContentCreator implements ContentCreator {
             order = removeAces(resourcePath, order, principal, acl);
 
             // now add all the new aces that we have collected
-            Map<Privilege, Integer> privilegeLongestDepthMap = buildPrivilegeLongestDepthMap(acm.privilegeFromName(PrivilegeConstants.JCR_ALL));
-            addAces(resourcePath, principal, denyRestrictionsToLocalPrivilegesMap, false, acl, privilegeLongestDepthMap);
-            addAces(resourcePath, principal, allowRestrictionsToLocalPrivilegesMap, true, acl, privilegeLongestDepthMap);
+            Map<Privilege, Integer> privilegeLongestDepthMap =
+                    buildPrivilegeLongestDepthMap(acm.privilegeFromName(PrivilegeConstants.JCR_ALL));
+            addAces(
+                    resourcePath,
+                    principal,
+                    denyRestrictionsToLocalPrivilegesMap,
+                    false,
+                    acl,
+                    privilegeLongestDepthMap);
+            addAces(
+                    resourcePath,
+                    principal,
+                    allowRestrictionsToLocalPrivilegesMap,
+                    true,
+                    acl,
+                    privilegeLongestDepthMap);
 
             // reorder the aces
             reorderAccessControlEntries(acl, principal, order);
@@ -1005,7 +1040,8 @@ public class DefaultContentCreator implements ContentCreator {
      * If the privilege is contained in multiple aggregate privileges, then
      * calculate the instance with the greatest depth.
      */
-    private static void toLongestDepth(int parentDepth, Privilege parentPrivilege, Map<Privilege, Integer> privilegeToLongestDepth) {
+    private static void toLongestDepth(
+            int parentDepth, Privilege parentPrivilege, Map<Privilege, Integer> privilegeToLongestDepth) {
         Privilege[] declaredAggregatePrivileges = parentPrivilege.getDeclaredAggregatePrivileges();
         for (Privilege privilege : declaredAggregatePrivileges) {
             Integer oldValue = privilegeToLongestDepth.get(privilege);
@@ -1021,7 +1057,7 @@ public class DefaultContentCreator implements ContentCreator {
 
     /**
      * Calculate the longest path for each of the possible privileges
-     * 
+     *
      * @param jcrSession the current users JCR session
      * @return map where the key is the privilege and the value is the longest path
      */
@@ -1034,14 +1070,14 @@ public class DefaultContentCreator implements ContentCreator {
 
     /**
      * Lookup the ACL for the given resource
-     * 
+     *
      * @param acm the access control manager
      * @param resourcePath the resource path
      * @param principal the principal for principalbased ACL
      * @return the found ACL object
      */
-    protected JackrabbitAccessControlList getAcl(@NotNull AccessControlManager acm, String resourcePath, Principal principal)
-            throws RepositoryException {
+    protected JackrabbitAccessControlList getAcl(
+            @NotNull AccessControlManager acm, String resourcePath, Principal principal) throws RepositoryException {
         AccessControlPolicy[] policies = acm.getPolicies(resourcePath);
         JackrabbitAccessControlList acl = null;
         for (AccessControlPolicy policy : policies) {
@@ -1065,18 +1101,22 @@ public class DefaultContentCreator implements ContentCreator {
 
     /**
      * Remove all of the ACEs for the specified principal from the ACL
-     * 
+     *
      * @param order the requested order (may be null)
      * @param principal the principal whose aces should be removed
      * @param acl the access control list to update
-     * @return the original order if it was supplied, otherwise the order of the first ACE 
+     * @return the original order if it was supplied, otherwise the order of the first ACE
      */
-    protected String removeAces(@NotNull String resourcePath, @Nullable String order, @NotNull Principal principal, @NotNull JackrabbitAccessControlList acl) // NOSONAR
+    protected String removeAces(
+            @NotNull String resourcePath,
+            @Nullable String order,
+            @NotNull Principal principal,
+            @NotNull JackrabbitAccessControlList acl) // NOSONAR
             throws RepositoryException {
         AccessControlEntry[] existingAccessControlEntries = acl.getAccessControlEntries();
 
         if (order == null || order.length() == 0) {
-            //order not specified, so keep track of the original ACE position.
+            // order not specified, so keep track of the original ACE position.
             Set<Principal> processedPrincipals = new HashSet<>();
             for (int j = 0; j < existingAccessControlEntries.length; j++) {
                 AccessControlEntry ace = existingAccessControlEntries[j];
@@ -1102,42 +1142,46 @@ public class DefaultContentCreator implements ContentCreator {
     /**
      * Add ACEs for the specified principal to the ACL.  One ACE is added for each unique
      * restriction set.
-     * 
+     *
      * @param resourcePath the path of the resource
      * @param principal the principal whose aces should be added
      * @param restrictionsToLocalPrivilegesMap the map containing the restrictions mapped to the LocalPrivlege items with those resrictions
      * @param isAllow true for 'allow' ACE, false for 'deny' ACE
      * @param acl the access control list to update
      */
-    protected void addAces(@NotNull String resourcePath, @NotNull Principal principal,
+    protected void addAces(
+            @NotNull String resourcePath,
+            @NotNull Principal principal,
             @NotNull Map<Set<LocalRestriction>, List<LocalPrivilege>> restrictionsToLocalPrivilegesMap,
             boolean isAllow,
             @NotNull JackrabbitAccessControlList acl,
-            Map<Privilege, Integer> privilegeLongestDepthMap) throws RepositoryException {
+            Map<Privilege, Integer> privilegeLongestDepthMap)
+            throws RepositoryException {
 
-        List<Entry<Set<LocalRestriction>, List<LocalPrivilege>>> sortedEntries = new ArrayList<>(restrictionsToLocalPrivilegesMap.entrySet());
+        List<Entry<Set<LocalRestriction>, List<LocalPrivilege>>> sortedEntries =
+                new ArrayList<>(restrictionsToLocalPrivilegesMap.entrySet());
         // sort the entries by the most shallow depth of the contained privileges
         Collections.sort(sortedEntries, (e1, e2) -> {
-                        int shallowestDepth1 = Integer.MAX_VALUE;
-                        for (LocalPrivilege lp : e1.getValue()) {
-                            Integer depth = privilegeLongestDepthMap.get(lp.getPrivilege());
-                            if (depth != null && depth.intValue() < shallowestDepth1) {
-                                shallowestDepth1 = depth.intValue();
-                            }
-                        }
-                        int shallowestDepth2 = Integer.MAX_VALUE;
-                        for (LocalPrivilege lp : e2.getValue()) {
-                            Integer depth = privilegeLongestDepthMap.get(lp.getPrivilege());
-                            if (depth != null && depth.intValue() < shallowestDepth2) {
-                                shallowestDepth2 = depth.intValue();
-                            }
-                        }
-                        return Integer.compare(shallowestDepth1, shallowestDepth2);
-                    });
+            int shallowestDepth1 = Integer.MAX_VALUE;
+            for (LocalPrivilege lp : e1.getValue()) {
+                Integer depth = privilegeLongestDepthMap.get(lp.getPrivilege());
+                if (depth != null && depth.intValue() < shallowestDepth1) {
+                    shallowestDepth1 = depth.intValue();
+                }
+            }
+            int shallowestDepth2 = Integer.MAX_VALUE;
+            for (LocalPrivilege lp : e2.getValue()) {
+                Integer depth = privilegeLongestDepthMap.get(lp.getPrivilege());
+                if (depth != null && depth.intValue() < shallowestDepth2) {
+                    shallowestDepth2 = depth.intValue();
+                }
+            }
+            return Integer.compare(shallowestDepth1, shallowestDepth2);
+        });
 
-        for (Entry<Set<LocalRestriction>, List<LocalPrivilege>> entry: sortedEntries) {
+        for (Entry<Set<LocalRestriction>, List<LocalPrivilege>> entry : sortedEntries) {
             Set<Privilege> privilegesSet = new HashSet<>();
-            Map<String, Value> restrictions = new HashMap<>(); 
+            Map<String, Value> restrictions = new HashMap<>();
             Map<String, Value[]> mvRestrictions = new HashMap<>();
 
             Set<LocalRestriction> localRestrictions = entry.getKey();
@@ -1154,7 +1198,12 @@ public class DefaultContentCreator implements ContentCreator {
             }
 
             if (!privilegesSet.isEmpty()) {
-                acl.addEntry(principal, privilegesSet.toArray(new Privilege[privilegesSet.size()]), isAllow, restrictions, mvRestrictions);
+                acl.addEntry(
+                        principal,
+                        privilegesSet.toArray(new Privilege[privilegesSet.size()]),
+                        isAllow,
+                        restrictions,
+                        mvRestrictions);
             }
         }
     }
@@ -1179,17 +1228,17 @@ public class DefaultContentCreator implements ContentCreator {
      * @throws UnsupportedRepositoryOperationException
      * @throws AccessControlException
      */
-    private static void reorderAccessControlEntries(AccessControlList acl,
-            Principal principal, String order) throws RepositoryException {
+    private static void reorderAccessControlEntries(AccessControlList acl, Principal principal, String order)
+            throws RepositoryException {
         if (order == null || order.length() == 0) {
-            return; //nothing to do
+            return; // nothing to do
         }
         if (acl instanceof JackrabbitAccessControlList) {
-            JackrabbitAccessControlList jacl = (JackrabbitAccessControlList)acl;
+            JackrabbitAccessControlList jacl = (JackrabbitAccessControlList) acl;
 
             AccessControlEntry[] accessControlEntries = jacl.getAccessControlEntries();
             if (accessControlEntries.length <= 1) {
-                return; //only one ACE, so nothing to reorder.
+                return; // only one ACE, so nothing to reorder.
             }
 
             AccessControlEntry beforeEntry = null;
@@ -1200,32 +1249,35 @@ public class DefaultContentCreator implements ContentCreator {
             } else if (order.startsWith("before ")) {
                 String beforePrincipalName = order.substring(7);
 
-                //find the index of the ACE of the 'before' principal
-                for (int i=0; i < accessControlEntries.length; i++) {
-                    if (beforePrincipalName.equals(accessControlEntries[i].getPrincipal().getName())) {
-                        //found it!
+                // find the index of the ACE of the 'before' principal
+                for (int i = 0; i < accessControlEntries.length; i++) {
+                    if (beforePrincipalName.equals(
+                            accessControlEntries[i].getPrincipal().getName())) {
+                        // found it!
                         beforeEntry = accessControlEntries[i];
                         break;
                     }
                 }
 
                 if (beforeEntry == null) {
-                    //didn't find an ACE that matched the 'before' principal
-                    throw new IllegalArgumentException("No ACE was found for the specified principal: " + beforePrincipalName);
+                    // didn't find an ACE that matched the 'before' principal
+                    throw new IllegalArgumentException(
+                            "No ACE was found for the specified principal: " + beforePrincipalName);
                 }
             } else if (order.startsWith("after ")) {
                 String afterPrincipalName = order.substring(6);
 
                 boolean foundPrincipal = false;
-                //find the index of the ACE of the 'after' principal
+                // find the index of the ACE of the 'after' principal
                 for (int i = accessControlEntries.length - 1; i >= 0; i--) {
-                    if (afterPrincipalName.equals(accessControlEntries[i].getPrincipal().getName())) {
-                        //found it!
+                    if (afterPrincipalName.equals(
+                            accessControlEntries[i].getPrincipal().getName())) {
+                        // found it!
                         foundPrincipal = true;
 
                         // the 'before' ACE is the next one after the 'after' ACE
                         if (i >= accessControlEntries.length - 1) {
-                            //the after is the last one in the list
+                            // the after is the last one in the list
                             beforeEntry = null;
                         } else {
                             beforeEntry = accessControlEntries[i + 1];
@@ -1235,23 +1287,24 @@ public class DefaultContentCreator implements ContentCreator {
                 }
 
                 if (!foundPrincipal) {
-                    //didn't find an ACE that matched the 'after' principal
-                    throw new IllegalArgumentException("No ACE was found for the specified principal: " + afterPrincipalName);
+                    // didn't find an ACE that matched the 'after' principal
+                    throw new IllegalArgumentException(
+                            "No ACE was found for the specified principal: " + afterPrincipalName);
                 }
             } else {
                 int index = -1;
                 try {
                     index = Integer.parseInt(order);
                 } catch (NumberFormatException nfe) {
-                    //not a number.
+                    // not a number.
                     throw new IllegalArgumentException("Illegal value for the order parameter: " + order);
                 }
                 if (index > accessControlEntries.length) {
-                    //invalid index
+                    // invalid index
                     throw new IndexOutOfBoundsException("Index value is too large: " + index);
                 }
 
-                //the index value is the index of the principal.  A principal may have more
+                // the index value is the index of the principal.  A principal may have more
                 // than one ACEs (deny + grant), so we need to compensate.
                 Map<Principal, Integer> principalToIndex = new HashMap<>();
                 for (int i = 0; i < accessControlEntries.length; i++) {
@@ -1259,9 +1312,8 @@ public class DefaultContentCreator implements ContentCreator {
                     Integer idx = i;
                     principalToIndex.computeIfAbsent(principal2, key -> idx);
                 }
-                Integer[] sortedIndexes = principalToIndex.values().stream()
-                        .sorted()
-                        .toArray(size -> new Integer[size]);
+                Integer[] sortedIndexes =
+                        principalToIndex.values().stream().sorted().toArray(size -> new Integer[size]);
                 if (index >= 0 && index < sortedIndexes.length - 1) {
                     int idx = sortedIndexes[index];
                     beforeEntry = accessControlEntries[idx];
@@ -1269,11 +1321,11 @@ public class DefaultContentCreator implements ContentCreator {
             }
 
             if (beforeEntry != null) {
-                //now loop through the entries to move the affected ACEs to the specified
+                // now loop through the entries to move the affected ACEs to the specified
                 // position.
                 for (AccessControlEntry ace : accessControlEntries) {
                     if (principal.equals(ace.getPrincipal())) {
-                        //this ACE is for the specified principal.
+                        // this ACE is for the specified principal.
                         jacl.orderBefore(ace, beforeEntry);
                     }
                 }
@@ -1285,7 +1337,7 @@ public class DefaultContentCreator implements ContentCreator {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.sling.jcr.contentloader.ContentCreator#getParent()
      */
     @Override
@@ -1332,7 +1384,7 @@ public class DefaultContentCreator implements ContentCreator {
         }
         if (node.isNodeType("mix:versionable")) {
             return node;
-        } 
+        }
         try {
             return findVersionableAncestor(node.getParent());
         } catch (ItemNotFoundException e) {
@@ -1348,7 +1400,8 @@ public class DefaultContentCreator implements ContentCreator {
         if (this.configuration.isAutoCheckout()) {
             Node versionableNode = findVersionableAncestor(node);
             if (versionableNode != null && !versionableNode.isCheckedOut()) {
-                VersionManager versionManager = versionableNode.getSession().getWorkspace().getVersionManager();
+                VersionManager versionManager =
+                        versionableNode.getSession().getWorkspace().getVersionManager();
                 versionManager.checkout(versionableNode.getPath());
                 if (this.importListener != null) {
                     this.importListener.onCheckout(versionableNode.getPath());
@@ -1361,35 +1414,41 @@ public class DefaultContentCreator implements ContentCreator {
     public void finish() throws RepositoryException {
         if (this.configuration.isMerge()) {
             Session session = this.createdRootNode.getSession();
-            importedNodes.stream().flatMap(n -> {
-                Set<String> iterable = getPeers(n,session);
-                return StreamSupport.stream(iterable.spliterator(), false);
-            }).filter(path -> !importedNodes.contains(path)).forEach(path -> removeNode(path,session));
-            importedNodes.stream().flatMap(n -> {
-                Set<String> iterable = getChildren(n,session);
-                return StreamSupport.stream(iterable.spliterator(), false);
-            }).filter(path -> !importedNodes.contains(path)).forEach(path -> removeNode(path,session));
+            importedNodes.stream()
+                    .flatMap(n -> {
+                        Set<String> iterable = getPeers(n, session);
+                        return StreamSupport.stream(iterable.spliterator(), false);
+                    })
+                    .filter(path -> !importedNodes.contains(path))
+                    .forEach(path -> removeNode(path, session));
+            importedNodes.stream()
+                    .flatMap(n -> {
+                        Set<String> iterable = getChildren(n, session);
+                        return StreamSupport.stream(iterable.spliterator(), false);
+                    })
+                    .filter(path -> !importedNodes.contains(path))
+                    .forEach(path -> removeNode(path, session));
         }
     }
-    
-    private Set<String> getPeers(String path,Session session) {
-            try {
-                log.debug("finding peers for {}", path);
-                NodeIterator it = session.getNode(path).getParent().getNodes();
-                Set<String> peers = new LinkedHashSet<>();
-                while (it.hasNext()) {
-                    String child = it.nextNode().getPath();
-                    if (!child.equals(path)) {
-                        peers.add(child);
-                    }
+
+    private Set<String> getPeers(String path, Session session) {
+        try {
+            log.debug("finding peers for {}", path);
+            NodeIterator it = session.getNode(path).getParent().getNodes();
+            Set<String> peers = new LinkedHashSet<>();
+            while (it.hasNext()) {
+                String child = it.nextNode().getPath();
+                if (!child.equals(path)) {
+                    peers.add(child);
                 }
-                return peers;
-            } catch (RepositoryException e) {
-                return Collections.emptySet();
             }
+            return peers;
+        } catch (RepositoryException e) {
+            return Collections.emptySet();
+        }
     }
-    
-    private Set<String> getChildren(String path,Session session) {
+
+    private Set<String> getChildren(String path, Session session) {
         try {
             log.debug("finding children for {}", path);
             NodeIterator it = session.getNode(path).getNodes();
@@ -1402,8 +1461,8 @@ public class DefaultContentCreator implements ContentCreator {
         } catch (RepositoryException e) {
             return Collections.emptySet();
         }
-}
-    
+    }
+
     private void removeNode(String item, Session session) {
         try {
             if (this.importListener != null) {
@@ -1415,7 +1474,5 @@ public class DefaultContentCreator implements ContentCreator {
         } catch (RepositoryException e) {
             log.warn("unable to remove node {}", item);
         }
-        
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
index 0d5d0be..e05d110 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
@@ -18,16 +18,16 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.version.VersionManager;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.sling.commons.mime.MimeTypeService;
 import org.apache.sling.jcr.contentloader.ContentImportListener;
 import org.apache.sling.jcr.contentloader.ContentImporter;
@@ -47,12 +47,12 @@ import org.slf4j.LoggerFactory;
  * <li>Import content into the content repository.
  * </ul>
  */
-@Component(service = ContentImporter.class,
-    property = {
+@Component(
+        service = ContentImporter.class,
+        property = {
             Constants.SERVICE_DESCRIPTION + "=Apache Sling JCR Content Import Service",
             Constants.SERVICE_VENDOR + "=The Apache Software Foundation"
-    })
-
+        })
 public class DefaultContentImporter extends BaseImportLoader implements ContentHelper, ContentImporter {
 
     /**
@@ -63,15 +63,16 @@ public class DefaultContentImporter extends BaseImportLoader implements ContentH
 
     private final Logger logger = LoggerFactory.getLogger(DefaultContentImporter.class);
 
-    @Reference(name="contentReaderWhiteboard",
-            cardinality=ReferenceCardinality.MANDATORY,
-             service=ContentReaderWhiteboard.class)
+    @Reference(
+            name = "contentReaderWhiteboard",
+            cardinality = ReferenceCardinality.MANDATORY,
+            service = ContentReaderWhiteboard.class)
     protected void bindContentReaderWhiteboard(final ContentReaderWhiteboard service) {
         this.contentReaderWhiteboard = service;
     }
 
     protected void unbindContentReaderWhiteboard(final ContentReaderWhiteboard service) {
-        if ( this.contentReaderWhiteboard == service ) {
+        if (this.contentReaderWhiteboard == service) {
             this.contentReaderWhiteboard = null;
         }
     }
@@ -80,8 +81,14 @@ public class DefaultContentImporter extends BaseImportLoader implements ContentH
      * @see org.apache.sling.jcr.contentloader.ContentImporter#importContent(javax.jcr.Node, java.lang.String, java.io.InputStream, org.apache.sling.jcr.contentloader.ImportOptions, org.apache.sling.jcr.contentloader.ContentImportListener)
      */
     @Override
-    public void importContent(Node parent, String filename, InputStream contentStream, ImportOptions importOptions, ContentImportListener importListener) throws RepositoryException, IOException {
-        logger.debug("initiate import of file name {}",filename);
+    public void importContent(
+            Node parent,
+            String filename,
+            InputStream contentStream,
+            ImportOptions importOptions,
+            ContentImportListener importListener)
+            throws RepositoryException, IOException {
+        logger.debug("initiate import of file name {}", filename);
         // special treatment for system view imports
         if (filename.endsWith(EXT_JCR_XML)) {
             importJcrXml(parent, filename, contentStream, importOptions, importListener);
@@ -99,8 +106,15 @@ public class DefaultContentImporter extends BaseImportLoader implements ContentH
     }
 
     @Override
-    public void importContent(final Node parent, final String name, final String contentType, final InputStream contentStream, final ImportOptions importOptions, final ContentImportListener importListener) throws RepositoryException, IOException {
-        logger.debug("initiate import {} of type {}",name, contentType);
+    public void importContent(
+            final Node parent,
+            final String name,
+            final String contentType,
+            final InputStream contentStream,
+            final ImportOptions importOptions,
+            final ContentImportListener importListener)
+            throws RepositoryException, IOException {
+        logger.debug("initiate import {} of type {}", name, contentType);
         // special treatment for system view imports
         if (ContentTypeUtil.TYPE_JCR_XML.equalsIgnoreCase(contentType)) {
             importJcrXml(parent, name, contentStream, importOptions, importListener);
@@ -110,13 +124,21 @@ public class DefaultContentImporter extends BaseImportLoader implements ContentH
         final DefaultContentCreator contentCreator = new DefaultContentCreator(this);
 
         final String extension = ContentTypeUtil.getDefaultExtension(contentType);
-        final ContentReader contentReader =  getContentReader(extension, importOptions);
+        final ContentReader contentReader = getContentReader(extension, importOptions);
 
         importContent(contentCreator, contentReader, parent, name, contentStream, importOptions, importListener);
     }
 
-    private void importContent(final DefaultContentCreator contentCreator, final ContentReader contentReader, final Node parent, final String name, final InputStream contentStream, final ImportOptions importOptions, final ContentImportListener importListener) throws RepositoryException, IOException {
-        logger.debug("initiate import of {}",name);
+    private void importContent(
+            final DefaultContentCreator contentCreator,
+            final ContentReader contentReader,
+            final Node parent,
+            final String name,
+            final InputStream contentStream,
+            final ImportOptions importOptions,
+            final ContentImportListener importListener)
+            throws RepositoryException, IOException {
+        logger.debug("initiate import of {}", name);
         List<String> createdPaths = new ArrayList<>();
         contentCreator.init(importOptions, getContentReaders(), createdPaths, importListener);
         contentCreator.prepareParsing(parent, name);
@@ -128,15 +150,22 @@ public class DefaultContentImporter extends BaseImportLoader implements ContentH
 
         // finally checkin versionable nodes
         for (final Node versionable : contentCreator.getVersionables()) {
-        	VersionManager versionManager = versionable.getSession().getWorkspace().getVersionManager();
-        	versionManager.checkin(versionable.getPath());
+            VersionManager versionManager =
+                    versionable.getSession().getWorkspace().getVersionManager();
+            versionManager.checkin(versionable.getPath());
             if (importListener != null) {
                 importListener.onCheckin(versionable.getPath());
             }
         }
     }
 
-    private void importJcrXml(final Node parent, final String name, final InputStream contentStream, final ImportOptions importOptions, final ContentImportListener importListener) throws IOException, RepositoryException {
+    private void importJcrXml(
+            final Node parent,
+            final String name,
+            final InputStream contentStream,
+            final ImportOptions importOptions,
+            final ContentImportListener importListener)
+            throws IOException, RepositoryException {
         logger.debug("import JCR XML: '{}'", name);
         boolean replace = importOptions != null && importOptions.isOverwrite();
         final Node node = importJcrXml(parent, name, contentStream, replace);
@@ -156,5 +185,4 @@ public class DefaultContentImporter extends BaseImportLoader implements ContentH
         MimeTypeService mts = mimeTypeService;
         return (mts != null) ? mts.getMimeType(name) : null;
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java
index 3f73ac4..75bcd2c 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/JcrXmlImporter.java
@@ -18,14 +18,14 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 import javax.jcr.InvalidSerializedDataException;
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import java.io.IOException;
+import java.io.InputStream;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,9 +50,11 @@ public class JcrXmlImporter {
      * @return <code>true</code> if the import succeeds, <code>false</code> if the import fails due to XML format errors.
      * @throws IOException If an IO error occurrs reading the XML file.
      */
-    protected Node importJcrXml(Node parent, String name, InputStream contentStream, boolean replace) throws IOException {
+    protected Node importJcrXml(Node parent, String name, InputStream contentStream, boolean replace)
+            throws IOException {
         try {
-            final String nodeName = (name.endsWith(EXT_JCR_XML)) ? name.substring(0, name.length() - EXT_JCR_XML.length()) : name;
+            final String nodeName =
+                    (name.endsWith(EXT_JCR_XML)) ? name.substring(0, name.length() - EXT_JCR_XML.length()) : name;
 
             // ensure the name is not empty
             if (nodeName.length() == 0) {
@@ -93,5 +95,4 @@ public class JcrXmlImporter {
             return null;
         }
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
index d7f0bc7..2236290 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
@@ -18,7 +18,12 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
-import static org.apache.sling.jcr.contentparser.impl.JsonTicksConverter.tickToDoubleQuote;
+import javax.jcr.Node;
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+import javax.jcr.ValueFormatException;
 
 import java.io.BufferedInputStream;
 import java.io.ByteArrayOutputStream;
@@ -36,12 +41,6 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.regex.Pattern;
 
-import javax.jcr.Node;
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.ValueFactory;
-import javax.jcr.ValueFormatException;
 import jakarta.json.Json;
 import jakarta.json.JsonArray;
 import jakarta.json.JsonException;
@@ -50,7 +49,6 @@ import jakarta.json.JsonObject;
 import jakarta.json.JsonString;
 import jakarta.json.JsonValue;
 import jakarta.json.JsonValue.ValueType;
-
 import org.apache.jackrabbit.oak.spi.security.authorization.restriction.CompositeRestrictionProvider;
 import org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionDefinition;
 import org.apache.jackrabbit.oak.spi.security.authorization.restriction.RestrictionProvider;
@@ -66,6 +64,8 @@ import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.component.annotations.Component;
 
+import static org.apache.sling.jcr.contentparser.impl.JsonTicksConverter.tickToDoubleQuote;
+
 /**
  * The <code>JsonReader</code> Parses a Json document on content load and
  * creates the corresponding node structure with properties. Will not update
@@ -115,8 +115,13 @@ import org.osgi.service.component.annotations.Component;
  *
  * </pre>
  */
-@Component(service = ContentReader.class, property = { Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
-        ContentReader.PROPERTY_EXTENSIONS + "=json", ContentReader.PROPERTY_TYPES + "=application/json" })
+@Component(
+        service = ContentReader.class,
+        property = {
+            Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+            ContentReader.PROPERTY_EXTENSIONS + "=json",
+            ContentReader.PROPERTY_TYPES + "=application/json"
+        })
 public class JsonReader implements ContentReader {
 
     private static final Pattern jsonDate = Pattern.compile(
@@ -127,6 +132,7 @@ public class JsonReader implements ContentReader {
     private static final String URI = "jcr:uri:";
 
     protected static final Set<String> ignoredNames = new HashSet<>();
+
     static {
         ignoredNames.add("jcr:primaryType");
         ignoredNames.add("jcr:mixinTypes");
@@ -139,6 +145,7 @@ public class JsonReader implements ContentReader {
     }
 
     private static final Set<String> ignoredPrincipalPropertyNames = new HashSet<>();
+
     static {
         ignoredPrincipalPropertyNames.add("name");
         ignoredPrincipalPropertyNames.add("isgroup");
@@ -146,6 +153,7 @@ public class JsonReader implements ContentReader {
         ignoredPrincipalPropertyNames.add("dynamic");
         ignoredPrincipalPropertyNames.add("password");
     }
+
     private static final String SECURITY_PRINCIPLES = "security:principals";
     private static final String SECURITY_ACL = "security:acl";
 
@@ -178,7 +186,8 @@ public class JsonReader implements ContentReader {
         }
         Map<String, Object> config = new HashMap<>();
         config.put("org.apache.johnzon.supports-comments", true);
-        try (jakarta.json.JsonReader reader = Json.createReaderFactory(config).createReader(new StringReader(tickToDoubleQuote(jsonString)))) {
+        try (jakarta.json.JsonReader reader =
+                Json.createReaderFactory(config).createReader(new StringReader(tickToDoubleQuote(jsonString)))) {
             JsonObject json = reader.readObject();
             this.createNode(null, json, contentCreator);
             contentCreator.finish();
@@ -262,22 +271,22 @@ public class JsonReader implements ContentReader {
     private Object unbox(Object o) {
         if (o instanceof JsonValue) {
             switch (((JsonValue) o).getValueType()) {
-            case FALSE:
-                return false;
-            case TRUE:
-                return true;
-            case NULL:
-                return null;
-            case NUMBER:
-                if (((JsonNumber) o).isIntegral()) {
-                    return Long.valueOf(((JsonNumber) o).longValue());
-                } else {
-                    return Double.valueOf(((JsonNumber) o).doubleValue());
-                }
-            case STRING:
-                return ((JsonString) o).getString();
-            default:
-                return o;
+                case FALSE:
+                    return false;
+                case TRUE:
+                    return true;
+                case NULL:
+                    return null;
+                case NUMBER:
+                    if (((JsonNumber) o).isIntegral()) {
+                        return Long.valueOf(((JsonNumber) o).longValue());
+                    } else {
+                        return Double.valueOf(((JsonNumber) o).doubleValue());
+                    }
+                case STRING:
+                    return ((JsonString) o).getString();
+                default:
+                    return o;
             }
         }
         return o;
@@ -294,16 +303,11 @@ public class JsonReader implements ContentReader {
         } else if (object instanceof Boolean) {
             return PropertyType.BOOLEAN;
         } else if (object instanceof String) {
-            if (name.startsWith(REFERENCE))
-                return PropertyType.REFERENCE;
-            if (name.startsWith(PATH))
-                return PropertyType.PATH;
-            if (name.startsWith(NAME))
-                return PropertyType.NAME;
-            if (name.startsWith(URI))
-                return PropertyType.URI;
-            if (jsonDate.matcher((String) object).matches())
-                return PropertyType.DATE;
+            if (name.startsWith(REFERENCE)) return PropertyType.REFERENCE;
+            if (name.startsWith(PATH)) return PropertyType.PATH;
+            if (name.startsWith(NAME)) return PropertyType.NAME;
+            if (name.startsWith(URI)) return PropertyType.URI;
+            if (jsonDate.matcher((String) object).matches()) return PropertyType.DATE;
         }
 
         // fall back to default
@@ -311,14 +315,10 @@ public class JsonReader implements ContentReader {
     }
 
     private String getName(String name) {
-        if (name.startsWith(REFERENCE))
-            return name.substring(REFERENCE.length());
-        if (name.startsWith(PATH))
-            return name.substring(PATH.length());
-        if (name.startsWith(NAME))
-            return name.substring(NAME.length());
-        if (name.startsWith(URI))
-            return name.substring(URI.length());
+        if (name.startsWith(REFERENCE)) return name.substring(REFERENCE.length());
+        if (name.startsWith(PATH)) return name.substring(PATH.length());
+        if (name.startsWith(NAME)) return name.substring(NAME.length());
+        if (name.startsWith(URI)) return name.substring(URI.length());
         return name;
     }
 
@@ -366,7 +366,7 @@ public class JsonReader implements ContentReader {
      *     ],
      *  }
      *  </code>
-     * 
+     *
      * @param obj
      *            Object
      * @param contentCreator
@@ -386,7 +386,8 @@ public class JsonReader implements ContentReader {
                 if (object instanceof JsonObject) {
                     createPrincipal((JsonObject) object, contentCreator);
                 } else {
-                    throw new JsonException("Unexpected data type in principals array: " + object.getClass().getName());
+                    throw new JsonException("Unexpected data type in principals array: "
+                            + object.getClass().getName());
                 }
             }
         }
@@ -464,7 +465,8 @@ public class JsonReader implements ContentReader {
                 if (object instanceof JsonObject) {
                     createAce((JsonObject) object, contentCreator);
                 } else {
-                    throw new JsonException("Unexpected data type in acl array: " + object.getClass().getName());
+                    throw new JsonException("Unexpected data type in acl array: "
+                            + object.getClass().getName());
                 }
             }
         }
@@ -494,13 +496,14 @@ public class JsonReader implements ContentReader {
             JsonValue restrictions = ace.get("restrictions");
             Set<LocalRestriction> restrictionsSet = Collections.emptySet();
             if (restrictions instanceof JsonObject) {
-                restrictionsSet = toLocalRestrictions((JsonObject)restrictions, srMap, vf);
+                restrictionsSet = toLocalRestrictions((JsonObject) restrictions, srMap, vf);
             }
 
             if (granted != null) {
                 for (int a = 0; a < granted.size(); a++) {
                     String privilegeName = granted.getString(a);
-                    LocalPrivilege lp = privilegeToLocalPrivilegesMap.computeIfAbsent(privilegeName, LocalPrivilege::new);
+                    LocalPrivilege lp =
+                            privilegeToLocalPrivilegesMap.computeIfAbsent(privilegeName, LocalPrivilege::new);
                     lp.setAllow(true);
                     lp.setAllowRestrictions(restrictionsSet);
                 }
@@ -509,7 +512,8 @@ public class JsonReader implements ContentReader {
             if (denied != null) {
                 for (int a = 0; a < denied.size(); a++) {
                     String privilegeName = denied.getString(a);
-                    LocalPrivilege lp = privilegeToLocalPrivilegesMap.computeIfAbsent(privilegeName, LocalPrivilege::new);
+                    LocalPrivilege lp =
+                            privilegeToLocalPrivilegesMap.computeIfAbsent(privilegeName, LocalPrivilege::new);
                     lp.setDeny(true);
                     lp.setDenyRestrictions(restrictionsSet);
                 }
@@ -519,34 +523,35 @@ public class JsonReader implements ContentReader {
         // now process the newer syntax
         JsonValue privileges = ace.get("privileges");
         if (privileges instanceof JsonObject) {
-            JsonObject privilegesObj = (JsonObject)privileges;
+            JsonObject privilegesObj = (JsonObject) privileges;
             for (Entry<String, JsonValue> entry : privilegesObj.entrySet()) {
                 String privilegeName = entry.getKey();
                 JsonValue privilegeValue = entry.getValue();
                 if (privilegeValue instanceof JsonObject) {
-                    JsonObject privilegeValueObj = (JsonObject)privilegeValue;
+                    JsonObject privilegeValueObj = (JsonObject) privilegeValue;
                     JsonValue allow = privilegeValueObj.get("allow");
                     boolean isAllow = false;
-                    Set<LocalRestriction> allowRestrictions = Collections.emptySet(); 
+                    Set<LocalRestriction> allowRestrictions = Collections.emptySet();
                     if (allow instanceof JsonObject) {
                         isAllow = true;
-                        allowRestrictions = toLocalRestrictions((JsonObject)allow, srMap, vf);
+                        allowRestrictions = toLocalRestrictions((JsonObject) allow, srMap, vf);
                     } else if (JsonValue.TRUE.equals(allow)) {
                         isAllow = true;
                     }
 
                     JsonValue deny = privilegeValueObj.get("deny");
                     boolean isDeny = false;
-                    Set<LocalRestriction> denyRestrictions = Collections.emptySet(); 
+                    Set<LocalRestriction> denyRestrictions = Collections.emptySet();
                     if (deny instanceof JsonObject) {
                         isDeny = true;
-                        denyRestrictions = toLocalRestrictions((JsonObject)deny, srMap, vf);
+                        denyRestrictions = toLocalRestrictions((JsonObject) deny, srMap, vf);
                     } else if (JsonValue.TRUE.equals(deny)) {
                         isDeny = true;
                     }
 
                     if (isAllow || isDeny) {
-                        LocalPrivilege lp = privilegeToLocalPrivilegesMap.computeIfAbsent(privilegeName, LocalPrivilege::new);
+                        LocalPrivilege lp =
+                                privilegeToLocalPrivilegesMap.computeIfAbsent(privilegeName, LocalPrivilege::new);
                         if (isAllow) {
                             lp.setAllow(true);
                             lp.setAllowRestrictions(allowRestrictions);
@@ -566,11 +571,10 @@ public class JsonReader implements ContentReader {
 
     /**
      * Calculate a map of restriction names to the restriction definition
-     * 
+     *
      * @param parentNode the node the restrictions are for
      */
-    protected Map<String, RestrictionDefinition> toSrMap(Node parentNode)
-            throws RepositoryException {
+    protected Map<String, RestrictionDefinition> toSrMap(Node parentNode) throws RepositoryException {
         // lazy initialized map for quick lookup when processing restrictions
         Map<String, RestrictionDefinition> supportedRestrictionsMap = new HashMap<>();
 
@@ -590,8 +594,8 @@ public class JsonReader implements ContentReader {
                 compositeRestrictionProvider = CompositeRestrictionProvider.newInstance(restrictionProviders);
 
                 // populate the map
-                Set<RestrictionDefinition> supportedRestrictions = compositeRestrictionProvider
-                        .getSupportedRestrictions(parentNode.getPath());
+                Set<RestrictionDefinition> supportedRestrictions =
+                        compositeRestrictionProvider.getSupportedRestrictions(parentNode.getPath());
                 for (RestrictionDefinition restrictionDefinition : supportedRestrictions) {
                     supportedRestrictionsMap.put(restrictionDefinition.getName(), restrictionDefinition);
                 }
@@ -610,14 +614,14 @@ public class JsonReader implements ContentReader {
 
     /**
      * Construct a LocalRestriction using data from the json object
-     * 
+     *
      * @param allowOrDenyObj the json object
      * @param srMap map of restriction names to the restriction definition
      * @param vf the ValueFactory
      */
-    protected Set<LocalRestriction> toLocalRestrictions(JsonObject allowOrDenyObj,
-            Map<String, RestrictionDefinition> srMap,
-            ValueFactory vf) throws RepositoryException {
+    protected Set<LocalRestriction> toLocalRestrictions(
+            JsonObject allowOrDenyObj, Map<String, RestrictionDefinition> srMap, ValueFactory vf)
+            throws RepositoryException {
         Set<LocalRestriction> restrictions = new HashSet<>();
         for (Entry<String, JsonValue> restrictionEntry : allowOrDenyObj.entrySet()) {
             String restrictionName = restrictionEntry.getKey();
@@ -644,7 +648,7 @@ public class JsonReader implements ContentReader {
                     lr = new LocalRestriction(restrictionName, values);
                 } else {
                     Value v = toValue(vf, jsonValue, restrictionType);
-                    lr = new LocalRestriction(restrictionName, new Value[] { v });
+                    lr = new LocalRestriction(restrictionName, new Value[] {v});
                 }
             } else {
                 if (jsonValue.getValueType() == ValueType.ARRAY) {
@@ -672,7 +676,7 @@ public class JsonReader implements ContentReader {
 
     /**
      * Attempt to convert the JsonValue to the equivalent JCR Value object
-     * 
+     *
      * @param factory
      *            the JCR value factory
      * @param jsonValue
@@ -686,29 +690,29 @@ public class JsonReader implements ContentReader {
         Value value = null;
         ValueType valueType = jsonValue.getValueType();
         switch (valueType) {
-        case TRUE:
-            value = factory.createValue(false);
-            break;
-        case FALSE:
-            value = factory.createValue(false);
-            break;
-        case NUMBER:
-            JsonNumber jsonNumber = (JsonNumber) jsonValue;
-            if (jsonNumber.isIntegral()) {
-                value = factory.createValue(jsonNumber.longValue());
-            } else {
-                value = factory.createValue(jsonNumber.doubleValue());
-            }
-            break;
-        case STRING:
-            value = factory.createValue(((JsonString) jsonValue).getString(), restrictionType);
-            break;
-        case NULL:
-        case ARRAY:
-        case OBJECT:
-        default:
-            // illegal JSON?
-            break;
+            case TRUE:
+                value = factory.createValue(false);
+                break;
+            case FALSE:
+                value = factory.createValue(false);
+                break;
+            case NUMBER:
+                JsonNumber jsonNumber = (JsonNumber) jsonValue;
+                if (jsonNumber.isIntegral()) {
+                    value = factory.createValue(jsonNumber.longValue());
+                } else {
+                    value = factory.createValue(jsonNumber.doubleValue());
+                }
+                break;
+            case STRING:
+                value = factory.createValue(((JsonString) jsonValue).getString(), restrictionType);
+                break;
+            case NULL:
+            case ARRAY:
+            case OBJECT:
+            default:
+                // illegal JSON?
+                break;
         }
 
         return value;
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReader.java
index 65ea83c..75f366f 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReader.java
@@ -18,16 +18,16 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
+import javax.jcr.RepositoryException;
+
 import java.util.Map;
 
-import javax.jcr.RepositoryException;
 import jakarta.json.Json;
 import jakarta.json.JsonArray;
 import jakarta.json.JsonException;
 import jakarta.json.JsonObject;
 import jakarta.json.JsonObjectBuilder;
 import jakarta.json.JsonValue;
-
 import org.apache.sling.jcr.contentloader.ContentCreator;
 import org.apache.sling.jcr.contentloader.ContentReader;
 import org.osgi.framework.Constants;
@@ -40,12 +40,13 @@ import org.osgi.service.component.annotations.Component;
  * children, in that order.
  * Note that this is the reponsability of the json file to set appropriate node type / mixins.
  */
-@Component(service = ContentReader.class,
-property = {
-    Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
-    ContentReader.PROPERTY_EXTENSIONS + "=ordered-json",
-    ContentReader.PROPERTY_TYPES + "=application/json"
-})
+@Component(
+        service = ContentReader.class,
+        property = {
+            Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+            ContentReader.PROPERTY_EXTENSIONS + "=ordered-json",
+            ContentReader.PROPERTY_TYPES + "=application/json"
+        })
 public class OrderedJsonReader extends JsonReader {
 
     private static final String PN_ORDEREDCHILDREN = "SLING:ordered";
@@ -53,7 +54,7 @@ public class OrderedJsonReader extends JsonReader {
 
     @Override
     protected void writeChildren(JsonObject obj, ContentCreator contentCreator) throws RepositoryException {
-        if (! obj.containsKey(PN_ORDEREDCHILDREN)) {
+        if (!obj.containsKey(PN_ORDEREDCHILDREN)) {
             super.writeChildren(obj, contentCreator);
         } else {
             for (Map.Entry<String, JsonValue> entry : obj.entrySet()) {
@@ -70,24 +71,23 @@ public class OrderedJsonReader extends JsonReader {
                                     if (oc instanceof JsonObject) {
                                         JsonObject child = (JsonObject) oc;
                                         String childName = child.getString(PN_ORDEREDCHILDNAME, null);
-                                        if (childName != null && !childName.isEmpty() ) {
+                                        if (childName != null && !childName.isEmpty()) {
                                             JsonObjectBuilder builder = Json.createObjectBuilder();
-                                            for (Map.Entry<String, JsonValue> e : child.entrySet())
-                                            {
-                                                if (!PN_ORDEREDCHILDNAME.equals(e.getKey()))
-                                                {
+                                            for (Map.Entry<String, JsonValue> e : child.entrySet()) {
+                                                if (!PN_ORDEREDCHILDNAME.equals(e.getKey())) {
                                                     builder.add(e.getKey(), e.getValue());
                                                 }
                                             }
                                             child = builder.build();
                                             this.createNode(childName, child, contentCreator);
                                         } else {
-                                            throw new JsonException(PN_ORDEREDCHILDREN + " children must have a name whose key is " + PN_ORDEREDCHILDNAME);
+                                            throw new JsonException(PN_ORDEREDCHILDREN
+                                                    + " children must have a name whose key is " + PN_ORDEREDCHILDNAME);
                                         }
                                     } else {
-                                        throw new JsonException(PN_ORDEREDCHILDREN + " array must only have JSONObject items");
+                                        throw new JsonException(
+                                                PN_ORDEREDCHILDREN + " array must only have JSONObject items");
                                     }
-
                                 }
                             } else {
                                 throw new JsonException(PN_ORDEREDCHILDREN + " value must be a JSON array");
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReader.java
index 86b8182..ab9741e 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReader.java
@@ -18,6 +18,16 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.xml.transform.Source;
+import javax.xml.transform.Templates;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
 import java.io.BufferedInputStream;
 import java.io.Closeable;
 import java.io.File;
@@ -39,16 +49,6 @@ import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
-import javax.xml.transform.Source;
-import javax.xml.transform.Templates;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
 import org.apache.sling.jcr.contentloader.ContentCreator;
 import org.apache.sling.jcr.contentloader.ContentReader;
 import org.jetbrains.annotations.Nullable;
@@ -99,9 +99,14 @@ import org.xmlpull.v1.XmlPullParserException;
  * {@link org.apache.sling.jcr.contentloader.internal.readers.XmlReader.FileDescription}
  * <code>&lt;nt:file&gt;</code> element.
  */
-@Component(service = ContentReader.class, property = { Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
-        ContentReader.PROPERTY_EXTENSIONS + "=xml", ContentReader.PROPERTY_TYPES + "=application/xml",
-        ContentReader.PROPERTY_TYPES + "=text/xml" })
+@Component(
+        service = ContentReader.class,
+        property = {
+            Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+            ContentReader.PROPERTY_EXTENSIONS + "=xml",
+            ContentReader.PROPERTY_TYPES + "=application/xml",
+            ContentReader.PROPERTY_TYPES + "=text/xml"
+        })
 public class XmlReader implements ContentReader {
 
     /*
@@ -138,7 +143,8 @@ public class XmlReader implements ContentReader {
     private static final String ELEM_FILE_NAMESPACE = "http://www.jcp.org/jcr/nt/1.0";
     private static final String ELEM_FILE_NAME = "file";
 
-    private static final String INVALID_XML_UNEXPECTED_ELEMENT = "XML file does not seem to contain valid content xml. Unexpected %s element in : %s";
+    private static final String INVALID_XML_UNEXPECTED_ELEMENT =
+            "XML file does not seem to contain valid content xml. Unexpected %s element in : %s";
     private static final String INVALID_XML_ELEMENT_NOT_ALLOWED = "Element is not allowed at this location: %s in %s";
 
     private KXmlParser xmlParser;
@@ -163,7 +169,7 @@ public class XmlReader implements ContentReader {
     @Override
     public synchronized void parse(final URL url, final ContentCreator creator)
             throws IOException, RepositoryException {
-        
+
         try (BufferedInputStream bufferedInput = new BufferedInputStream(url.openStream())) {
             // We need to buffer input, so that we can reset the stream if we encounter an
             // XSL stylesheet reference
@@ -175,7 +181,7 @@ public class XmlReader implements ContentReader {
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.apache.sling.jcr.contentloader.ContentReader#parse(java.io.InputStream,
      * org.apache.sling.jcr.contentloader.ContentCreator)
@@ -223,15 +229,14 @@ public class XmlReader implements ContentReader {
                     // XSL
                     bufferedInput.reset();
                     // Pipe the XML input through the XSL transformer
-                    XslTransformerStream transformerStream = new XslTransformerStream(bufferedInput,
-                            pi.getAttribute(HREF_ATTRIBUTE), xmlLocation);
+                    XslTransformerStream transformerStream =
+                            new XslTransformerStream(bufferedInput, pi.getAttribute(HREF_ATTRIBUTE), xmlLocation);
                     // Start the transformer thread
                     transformerStream.startTransform();
                     // Re-run the XML parser, now with the transformed XML
                     parseInternal(transformerStream, creator, xmlLocation);
                     transformerStream.close();
                     return;
-
                 }
             }
             if (eventType == XmlPullParser.START_TAG) {
@@ -280,7 +285,9 @@ public class XmlReader implements ContentReader {
                 if (ELEM_PROPERTY.equals(qName)) {
                     if (currentProperty != null) {
                         if (currentProperty.getName() == null) {
-                            throw new IOException(String.format("XML file does not seem to contain valid content xml. Expected %s element for property in : %s", ELEM_NAME, xmlLocation));
+                            throw new IOException(String.format(
+                                    "XML file does not seem to contain valid content xml. Expected %s element for property in : %s",
+                                    ELEM_NAME, xmlLocation));
                         }
                         currentProperty = PropertyDescription.create(currentProperty, creator);
                     }
@@ -350,7 +357,7 @@ public class XmlReader implements ContentReader {
 
         /**
          * Instantiate the XslTransformerStream.
-         * 
+         *
          * @param inputXml
          *            XML to be transformed.
          * @param xslHref
@@ -370,34 +377,37 @@ public class XmlReader implements ContentReader {
         /**
          * Starts the XSL transformer in a new thread, so that it can pipe its output to
          * our <code>PipedInputStream</code>.
-         * 
+         *
          * @throws IOException
          */
         public void startTransform() throws IOException {
             final URL xslResource = new URL(xmlLocation, this.xslHref);
 
-            transformerThread = new Thread(() -> {
-                try {
-                    Source xml = new StreamSource(inputXml);
-                    Source xsl = new StreamSource(xslResource.toExternalForm());
-                    final StreamResult streamResult;
-                    final Templates templates = TransformerFactory.newInstance().newTemplates(xsl);
-                    streamResult = new StreamResult(pipedOut);
-                    templates.newTransformer().transform(xml, streamResult);
-                } catch (TransformerConfigurationException e) {
-                    throw new RuntimeException("Error initializing XSL transformer", e);
-                } catch (TransformerException e) {
-                    throw new RuntimeException("Error transforming", e);
-                } finally {
-                    closeStream(pipedOut);
-                }
-            }, "XslTransformerThread");
+            transformerThread = new Thread(
+                    () -> {
+                        try {
+                            Source xml = new StreamSource(inputXml);
+                            Source xsl = new StreamSource(xslResource.toExternalForm());
+                            final StreamResult streamResult;
+                            final Templates templates =
+                                    TransformerFactory.newInstance().newTemplates(xsl);
+                            streamResult = new StreamResult(pipedOut);
+                            templates.newTransformer().transform(xml, streamResult);
+                        } catch (TransformerConfigurationException e) {
+                            throw new RuntimeException("Error initializing XSL transformer", e);
+                        } catch (TransformerException e) {
+                            throw new RuntimeException("Error transforming", e);
+                        } finally {
+                            closeStream(pipedOut);
+                        }
+                    },
+                    "XslTransformerThread");
             transformerThread.start();
         }
 
         /**
          * Utility function to close a stream if it is still open.
-         * 
+         *
          * @param closeable
          *            Stream to close
          */
@@ -579,7 +589,6 @@ public class XmlReader implements ContentReader {
         public String getAttribute(String key) {
             return this.attributes.get(key);
         }
-
     }
 
     /**
@@ -589,11 +598,11 @@ public class XmlReader implements ContentReader {
      * <code>lastModified</code>. <br>
      * <br>
      * Example:
-     * 
+     *
      * <pre>
      * &lt;nt:file src="../../image.png" mimeType="image/png" lastModified="1977-06-01T07:00:00+0100" /&gt;
      * </pre>
-     * 
+     *
      * The date format for <code>lastModified</code> is
      * <code>yyyy-MM-dd'T'HH:mm:ssZ</code>. The <code>lastModified</code> attribute
      * is optional. If missing, the last modified date reported by the filesystem
@@ -696,7 +705,7 @@ public class XmlReader implements ContentReader {
         /**
          * Puts values in an <code>AttributeMap</code> by extracting attributes from the
          * <code>xmlParser</code>.
-         * 
+         *
          * @param xmlParser
          *            <code>xmlParser</code> to extract attributes from. The parser must
          *            be in {@link org.xmlpull.v1.XmlPullParser#START_TAG} state.
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReader.java
index 08edf50..70cfd36 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReader.java
@@ -18,6 +18,8 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
+import javax.jcr.RepositoryException;
+
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
@@ -34,8 +36,6 @@ import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import javax.jcr.RepositoryException;
-
 import org.apache.commons.io.input.CloseShieldInputStream;
 import org.apache.commons.lang3.SystemUtils;
 import org.apache.sling.jcr.contentloader.ContentCreator;
@@ -49,36 +49,40 @@ import org.osgi.service.metatype.annotations.ObjectClassDefinition;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
 /**
  * The <code>ZipReader</code>
  *
  * @since 2.0.4
  */
-@Component(service = ContentReader.class,
-    property = {
-        Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
-        ContentReader.PROPERTY_EXTENSIONS + "=zip",
-        ContentReader.PROPERTY_EXTENSIONS + "=jar",
-        ContentReader.PROPERTY_TYPES + "=application/zip",
-        ContentReader.PROPERTY_TYPES + "=application/java-archive"
-})
-@Designate(ocd=ZipReader.Config.class)
+@Component(
+        service = ContentReader.class,
+        property = {
+            Constants.SERVICE_VENDOR + "=The Apache Software Foundation",
+            ContentReader.PROPERTY_EXTENSIONS + "=zip",
+            ContentReader.PROPERTY_EXTENSIONS + "=jar",
+            ContentReader.PROPERTY_TYPES + "=application/zip",
+            ContentReader.PROPERTY_TYPES + "=application/java-archive"
+        })
+@Designate(ocd = ZipReader.Config.class)
 public class ZipReader implements ContentReader {
 
-    @ObjectClassDefinition(name = "%zipreader.config.name",
-            description="%zipreader.config.description",
+    @ObjectClassDefinition(
+            name = "%zipreader.config.name",
+            description = "%zipreader.config.description",
             localization = "OSGI-INF/l10n/bundle")
     public @interface Config {
-        @AttributeDefinition(name = "%zipreader.config.thresholdEntries.name",
+        @AttributeDefinition(
+                name = "%zipreader.config.thresholdEntries.name",
                 description = "%zipreader.config.thresholdEntries.description")
         long thresholdEntries() default 10000;
 
-        @AttributeDefinition(name = "%zipreader.config.thresholdSize.name",
+        @AttributeDefinition(
+                name = "%zipreader.config.thresholdSize.name",
                 description = "%zipreader.config.thresholdSize.description")
         long thresholdSize() default 1000000000; // 1 GB
 
-        @AttributeDefinition(name = "%zipreader.config.thresholdRatio.name",
+        @AttributeDefinition(
+                name = "%zipreader.config.thresholdRatio.name",
                 description = "%zipreader.config.thresholdRatio.description")
         double thresholdRatio() default 10.0;
     }
@@ -100,8 +104,7 @@ public class ZipReader implements ContentReader {
      * @see org.apache.sling.jcr.contentloader.ContentReader#parse(java.net.URL, org.apache.sling.jcr.contentloader.ContentCreator)
      */
     @Override
-    public void parse(java.net.URL url, ContentCreator creator)
-            throws IOException, RepositoryException {
+    public void parse(java.net.URL url, ContentCreator creator) throws IOException, RepositoryException {
         try (InputStream is = url.openStream()) {
             parse(is, creator);
         }
@@ -118,16 +121,15 @@ public class ZipReader implements ContentReader {
     static File createTempFile() throws IOException {
         File tmpFile;
         if (isOsUnix()) {
-            FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rw-------"));
+            FileAttribute<Set<PosixFilePermission>> attr =
+                    PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rw-------"));
             tmpFile = Files.createTempFile("zipentry", ".tmp", attr).toFile();
         } else {
             tmpFile = Files.createTempFile("zipentry", ".tmp").toFile(); // NOSONAR
-            if (!tmpFile.setReadable(true, true))
-                throw new IOException("Failed to set the temp file as readable");
-            if (!tmpFile.setWritable(true, true))
-                throw new IOException("Failed to set the temp file as writable");
+            if (!tmpFile.setReadable(true, true)) throw new IOException("Failed to set the temp file as readable");
+            if (!tmpFile.setWritable(true, true)) throw new IOException("Failed to set the temp file as writable");
         }
-        return tmpFile; 
+        return tmpFile;
     }
 
     static void removeTempFile(File tempFile) {
@@ -145,10 +147,9 @@ public class ZipReader implements ContentReader {
      * @see org.apache.sling.jcr.contentloader.ContentReader#parse(java.io.InputStream, org.apache.sling.jcr.contentloader.ContentCreator)
      */
     @Override
-    public void parse(InputStream ins, ContentCreator creator)
-            throws IOException, RepositoryException {
+    public void parse(InputStream ins, ContentCreator creator) throws IOException, RepositoryException {
         File tempFile = null;
-        try ( ZipInputStream zis = new ZipInputStream(ins)) {
+        try (ZipInputStream zis = new ZipInputStream(ins)) {
             creator.createNode(null, NT_FOLDER, null);
             ZipEntry entry;
             int totalSizeArchive = 0;
@@ -156,18 +157,18 @@ public class ZipReader implements ContentReader {
             tempFile = createTempFile();
             do {
                 entry = zis.getNextEntry();
-                if ( entry != null ) {
-                    totalEntryArchive ++;
+                if (entry != null) {
+                    totalEntryArchive++;
 
-                    if ( !entry.isDirectory() ) {
+                    if (!entry.isDirectory()) {
                         // uncompress the entry to a temp file
-                        totalSizeArchive = copyZipEntryToTempFile(tempFile, zis, entry,
-                                totalSizeArchive, totalEntryArchive);
+                        totalSizeArchive =
+                                copyZipEntryToTempFile(tempFile, zis, entry, totalSizeArchive, totalEntryArchive);
 
                         // now process the entry data from the data stored in the temp file
                         String name = entry.getName();
                         int pos = name.lastIndexOf('/');
-                        if ( pos != -1 ) {
+                        if (pos != -1) {
                             creator.switchCurrentNode(name.substring(0, pos), NT_FOLDER);
                         }
                         try (FileInputStream fis = new FileInputStream(tempFile)) {
@@ -175,14 +176,14 @@ public class ZipReader implements ContentReader {
                         }
                         creator.finishNode();
                         creator.finishNode();
-                        if ( pos != -1 ) {
+                        if (pos != -1) {
                             creator.finishNode();
                         }
                     }
                     zis.closeEntry();
                 }
 
-            } while ( entry != null );
+            } while (entry != null);
             creator.finishNode();
         } finally {
             removeTempFile(tempFile);
@@ -190,9 +191,9 @@ public class ZipReader implements ContentReader {
     }
 
     /**
-     * Copy the contents of a zip entry to a temp file and check the 
+     * Copy the contents of a zip entry to a temp file and check the
      * entry contents against the configured threshold for violations
-     * 
+     *
      * @param tempFile the temp file to write the entry to
      * @param zis the input stream for the zip file we are processing
      * @param entry the current zip entry
@@ -201,8 +202,9 @@ public class ZipReader implements ContentReader {
      * @return the new totalSizeArchive value after reading the entry
      * @throws IOException
      */
-    protected int copyZipEntryToTempFile(File tempFile, ZipInputStream zis, ZipEntry entry, int totalSizeArchive,
-            int totalEntryArchive) throws IOException {
+    protected int copyZipEntryToTempFile(
+            File tempFile, ZipInputStream zis, ZipEntry entry, int totalSizeArchive, int totalEntryArchive)
+            throws IOException {
         int nBytes = -1;
         byte[] buffer = new byte[2048];
         int totalSizeEntry = 0;
@@ -216,7 +218,7 @@ public class ZipReader implements ContentReader {
                 totalSizeEntry += nBytes;
                 totalSizeArchive += nBytes;
 
-                double compressionRatio = (double)totalSizeEntry / entry.getCompressedSize();
+                double compressionRatio = (double) totalSizeEntry / entry.getCompressedSize();
                 if (compressionRatio > thresholdRatio) {
                     // ratio between compressed and uncompressed data is highly suspicious, looks like a Zip Bomb Attack
                     throw new IOException("The compression ratio exceeded the allowed threshold");
@@ -235,5 +237,4 @@ public class ZipReader implements ContentReader {
         }
         return totalSizeArchive;
     }
-
 }
diff --git a/src/main/java/org/apache/sling/jcr/contentloader/package-info.java b/src/main/java/org/apache/sling/jcr/contentloader/package-info.java
index 569304a..117cd19 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/package-info.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/package-info.java
@@ -19,4 +19,3 @@
 
 @org.osgi.annotation.versioning.Version("0.5.0")
 package org.apache.sling.jcr.contentloader;
-
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/ContentCreatorTest.java b/src/test/java/org/apache/sling/jcr/contentloader/ContentCreatorTest.java
index 95427ab..c1bbdcb 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/ContentCreatorTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/ContentCreatorTest.java
@@ -1,26 +1,28 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader;
 
+import javax.jcr.RepositoryException;
+
 import java.io.InputStream;
 import java.util.Map;
 
-import javax.jcr.RepositoryException;
-
 import org.junit.Test;
 
 /**
@@ -39,7 +41,7 @@ public class ContentCreatorTest {
 
     @Deprecated
     @Test(expected = UnsupportedOperationException.class)
-    public void testCreateAce2() throws RepositoryException{
+    public void testCreateAce2() throws RepositoryException {
         contentCreator.createAce(null, null, null, null, null, null, null);
     }
 
@@ -112,7 +114,5 @@ public class ContentCreatorTest {
                 throws RepositoryException {
             throw new UnsupportedOperationException();
         }
-
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/ImportOptionsFactory.java b/src/test/java/org/apache/sling/jcr/contentloader/ImportOptionsFactory.java
index 9708dcb..5f8aee8 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/ImportOptionsFactory.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/ImportOptionsFactory.java
@@ -1,44 +1,46 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader;
 
 import org.jetbrains.annotations.NotNull;
 
 public final class ImportOptionsFactory {
-    
+
     public static final int NO_OPTIONS = 0;
-    
+
     public static final int OVERWRITE_NODE = 0x1;
-    
+
     public static final int OVERWRITE_PROPERTIES = 0x1 << 1;
-    
+
     public static final int SYNCH_PROPERTIES = 0x1 << 2;
-    
+
     public static final int SYNCH_NODES = 0x1 << 3;
-    
+
     public static final int AUTO_CHECKOUT = 0x1 << 4;
-    
+
     public static final int IGNORE_IMPORT_PROVIDER = 0x1 << 5;
-    
+
     public static final int CHECK_IN = 0x1 << 6;
 
     public static final int REQUIRE_IMPORT_PROVIDER = 0x1 << 7;
 
-    public static ImportOptions createImportOptions(int options){
+    public static ImportOptions createImportOptions(int options) {
         return new ImportOptions() {
             @Override
             public boolean isOverwrite() {
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/LocalPrivilegeTest.java b/src/test/java/org/apache/sling/jcr/contentloader/LocalPrivilegeTest.java
index ac7a307..228e659 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/LocalPrivilegeTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/LocalPrivilegeTest.java
@@ -1,37 +1,33 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.Privilege;
 
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.jackrabbit.oak.security.authorization.restriction.RestrictionProviderImpl;
 import org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants;
@@ -43,6 +39,12 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 /**
  *
  */
@@ -96,7 +98,7 @@ public class LocalPrivilegeTest {
 
     /**
      * Test method for {@link org.apache.sling.jcr.contentloader.LocalPrivilege#checkPrivilege(javax.jcr.security.AccessControlManager)}.
-     * @throws RepositoryException 
+     * @throws RepositoryException
      */
     @Test
     public void testCheckPrivilege() throws RepositoryException {
@@ -107,7 +109,7 @@ public class LocalPrivilegeTest {
 
     /**
      * Test method for {@link org.apache.sling.jcr.contentloader.LocalPrivilege#getPrivilege()}.
-     * @throws RepositoryException 
+     * @throws RepositoryException
      */
     @Test
     public void testGetPrivilege() throws RepositoryException {
@@ -291,12 +293,14 @@ public class LocalPrivilegeTest {
         assertNotEquals(lp10, lp11);
 
         LocalPrivilege lp12 = new LocalPrivilege(PrivilegeConstants.JCR_READ);
-        lp12.setAllowRestrictions(new HashSet<>(Arrays.asList(new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello")))));
+        lp12.setAllowRestrictions(
+                new HashSet<>(Arrays.asList(new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello")))));
         LocalPrivilege lp13 = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         assertNotEquals(lp12, lp13);
 
         LocalPrivilege lp14 = new LocalPrivilege(PrivilegeConstants.JCR_READ);
-        lp14.setDenyRestrictions(new HashSet<>(Arrays.asList(new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello")))));
+        lp14.setDenyRestrictions(
+                new HashSet<>(Arrays.asList(new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello")))));
         LocalPrivilege lp15 = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         assertNotEquals(lp14, lp15);
 
@@ -324,5 +328,4 @@ public class LocalPrivilegeTest {
         lp25.setDenyRestrictions(null);
         assertEquals(lp24, lp25);
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/LocalRestrictionTest.java b/src/test/java/org/apache/sling/jcr/contentloader/LocalRestrictionTest.java
index e3be41b..a32dae1 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/LocalRestrictionTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/LocalRestrictionTest.java
@@ -1,30 +1,23 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
 import javax.jcr.PropertyType;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
@@ -34,6 +27,15 @@ import org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.Access
 import org.apache.jackrabbit.value.ValueFactoryImpl;
 import org.junit.Test;
 
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 /**
  *
  */
@@ -42,13 +44,16 @@ public class LocalRestrictionTest {
     public static Value val(String value) throws ValueFormatException {
         return val(ValueFactoryImpl.getInstance(), PropertyType.STRING, value);
     }
+
     public static Value val(ValueFactory vf, int type, String value) throws ValueFormatException {
         return vf.createValue(value, type);
     }
-    public static Value[] vals(String ... value) throws ValueFormatException {
+
+    public static Value[] vals(String... value) throws ValueFormatException {
         return vals(ValueFactoryImpl.getInstance(), PropertyType.STRING, value);
     }
-    public static Value[] vals(ValueFactory vf, int type, String ... value) throws ValueFormatException {
+
+    public static Value[] vals(ValueFactory vf, int type, String... value) throws ValueFormatException {
         Value[] values = new Value[value.length];
         for (int i = 0; i < value.length; i++) {
             values[i] = vf.createValue(value[i], type);
@@ -68,12 +73,12 @@ public class LocalRestrictionTest {
         LocalRestriction lr3 = new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello1"));
         assertEquals(lr1.hashCode(), lr3.hashCode());
 
-        LocalRestriction lr4 = new LocalRestriction(null, (Value)null);
-        LocalRestriction lr5 = new LocalRestriction(null, (Value[])null);
+        LocalRestriction lr4 = new LocalRestriction(null, (Value) null);
+        LocalRestriction lr5 = new LocalRestriction(null, (Value[]) null);
         assertNotSame(lr4.hashCode(), lr5.hashCode());
-        LocalRestriction lr6 = new LocalRestriction(null, (Value)null);
+        LocalRestriction lr6 = new LocalRestriction(null, (Value) null);
         assertEquals(lr4.hashCode(), lr6.hashCode());
-        LocalRestriction lr7 = new LocalRestriction(null, (Value[])null);
+        LocalRestriction lr7 = new LocalRestriction(null, (Value[]) null);
         assertEquals(lr5.hashCode(), lr7.hashCode());
     }
 
@@ -106,13 +111,13 @@ public class LocalRestrictionTest {
         LocalRestriction lr1 = new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello1"));
         assertEquals(val("/hello1"), lr1.getValue());
 
-        LocalRestriction lr2 = new LocalRestriction(AccessControlConstants.REP_GLOB, (Value)null);
+        LocalRestriction lr2 = new LocalRestriction(AccessControlConstants.REP_GLOB, (Value) null);
         assertNull(lr2.getValue());
 
         LocalRestriction lr3 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals("item1", "item2"));
         assertEquals(val("item1"), lr3.getValue());
 
-        LocalRestriction lr4 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, (Value[])new Value[0]);
+        LocalRestriction lr4 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, (Value[]) new Value[0]);
         assertNull(lr4.getValue());
     }
 
@@ -124,7 +129,7 @@ public class LocalRestrictionTest {
         LocalRestriction lr1 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals("item1", "item2"));
         assertArrayEquals(vals("item1", "item2"), lr1.getValues());
 
-        LocalRestriction lr2 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, (Value[])null);
+        LocalRestriction lr2 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, (Value[]) null);
         assertNull(lr2.getValues());
 
         LocalRestriction lr3 = new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, new Value[0]);
@@ -179,5 +184,4 @@ public class LocalRestrictionTest {
         LocalRestriction lr13 = new LocalRestriction(AccessControlConstants.REP_GLOB, val("/hello2"));
         assertNotEquals(lr12, lr13);
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/PathEntryTest.java b/src/test/java/org/apache/sling/jcr/contentloader/PathEntryTest.java
index 68fcc85..43fa6f3 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/PathEntryTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/PathEntryTest.java
@@ -18,12 +18,6 @@
  */
 package org.apache.sling.jcr.contentloader;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -37,32 +31,43 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.osgi.framework.Bundle;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 public class PathEntryTest {
     final String pathEntryPath = "/test/path";
-    
+
     @Rule
     public final JUnitRuleMockery mockery = new JUnitRuleMockery();
 
     @Test
-    public void testGetContentPaths(){
+    public void testGetContentPaths() {
         final Bundle bundle = mockery.mock(Bundle.class);
         final Dictionary<String, String> dict = new Hashtable<>();
         dict.put("Bnd-LastModified", "1258555936230");
         dict.put(PathEntry.CONTENT_HEADER, "test1, test2");
-        //PathEntry#getContentPaths should return this value
-        //since its lower that value of "Bnd-LastModified" key
+        // PathEntry#getContentPaths should return this value
+        // since its lower that value of "Bnd-LastModified" key
         final long lastModifiedValue = 1258555936229L;
 
-        mockery.checking(new Expectations() {{
-            allowing(bundle).getSymbolicName(); will(returnValue("example-bundle-name"));
-            allowing(bundle).getLastModified(); will(returnValue(lastModifiedValue));
-            allowing(bundle).getHeaders(); will(returnValue(dict));
-        }});
+        mockery.checking(new Expectations() {
+            {
+                allowing(bundle).getSymbolicName();
+                will(returnValue("example-bundle-name"));
+                allowing(bundle).getLastModified();
+                will(returnValue(lastModifiedValue));
+                allowing(bundle).getHeaders();
+                will(returnValue(dict));
+            }
+        });
 
         int i = 0;
         Iterator<PathEntry> paths = PathEntry.getContentPaths(bundle);
         assertNotNull(paths);
-        while(paths.hasNext()){
+        while (paths.hasNext()) {
             i++;
             assertEquals(lastModifiedValue, paths.next().getLastModified());
         }
@@ -120,7 +125,7 @@ public class PathEntryTest {
     private class TestEntry implements ManifestHeader.Entry {
         private final Map<String, String> values;
 
-        private TestEntry(Map<String, String> values){
+        private TestEntry(Map<String, String> values) {
             this.values = values;
         }
 
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListenerTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListenerTest.java
index adce610..9f37158 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListenerTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderListenerTest.java
@@ -18,17 +18,10 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.BUNDLE_CONTENT_NODE;
-import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.PROPERTY_CONTENT_LOADED;
-import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT;
-import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.PROPERTY_UNINSTALL_PATHS;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.lock.LockManager;
 
 import java.util.Calendar;
 import java.util.List;
@@ -36,11 +29,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.lock.LockManager;
-
+import junitx.util.PrivateAccessor;
 import org.apache.sling.jcr.contentloader.internal.readers.JsonReader;
 import org.apache.sling.jcr.contentloader.internal.readers.OrderedJsonReader;
 import org.apache.sling.jcr.contentloader.internal.readers.XmlReader;
@@ -54,7 +43,17 @@ import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleEvent;
 
-import junitx.util.PrivateAccessor;
+import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.BUNDLE_CONTENT_NODE;
+import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.PROPERTY_CONTENT_LOADED;
+import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.PROPERTY_CONTENT_LOADED_AT;
+import static org.apache.sling.jcr.contentloader.internal.BundleContentLoaderListener.PROPERTY_UNINSTALL_PATHS;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 public class BundleContentLoaderListenerTest {
 
@@ -83,46 +82,47 @@ public class BundleContentLoaderListenerTest {
         contentLoader = (BundleContentLoader) PrivateAccessor.getField(underTest, "bundleContentLoader");
     }
 
-    //-------BundleContentLoaderListener#bundleChanged(BundleEvent)-------//
-    //I'm not very sure how to test this method, it looks like side effect of this method goes very deep
-    //And more affects BundleContentLoader than BundleContentLoaderListener
+    // -------BundleContentLoaderListener#bundleChanged(BundleEvent)-------//
+    // I'm not very sure how to test this method, it looks like side effect of this method goes very deep
+    // And more affects BundleContentLoader than BundleContentLoaderListener
 
     @Test
     public void testBundleResolvedBundleChanged() throws NoSuchFieldException, RepositoryException {
         final Bundle bundle = createNewBundle();
         @SuppressWarnings("unchecked")
-		final List<Bundle> delayedBundles = (List<Bundle>) PrivateAccessor.getField(contentLoader, "delayedBundles");
+        final List<Bundle> delayedBundles = (List<Bundle>) PrivateAccessor.getField(contentLoader, "delayedBundles");
         @SuppressWarnings("unchecked")
-		final Set<String> updatedBundles = (Set<String>) PrivateAccessor.getField(underTest, "updatedBundles");
+        final Set<String> updatedBundles = (Set<String>) PrivateAccessor.getField(underTest, "updatedBundles");
 
         updatedBundles.add(bundle.getSymbolicName());
         int updatedBundlesCurrentAmout = updatedBundles.size();
         underTest.bundleChanged(new BundleEvent(BundleEvent.RESOLVED, bundle));
-        //Below we check that this bundle was removed from updatedBundles set
-        assertEquals(updatedBundlesCurrentAmout-1, delayedBundles.size());
+        // Below we check that this bundle was removed from updatedBundles set
+        assertEquals(updatedBundlesCurrentAmout - 1, delayedBundles.size());
 
         updatedBundlesCurrentAmout = updatedBundles.size();
         underTest.bundleChanged(new BundleEvent(BundleEvent.UPDATED, bundle));
-        assertEquals(updatedBundlesCurrentAmout+1, updatedBundles.size());
+        assertEquals(updatedBundlesCurrentAmout + 1, updatedBundles.size());
 
-        //Is it ok just to call this method to check that no exception occurs?
+        // Is it ok just to call this method to check that no exception occurs?
         underTest.bundleChanged(new BundleEvent(BundleEvent.UNINSTALLED, bundle));
     }
 
-    //-------BundleContentLoaderListener#bundleChanged(BundleEvent)-------//
+    // -------BundleContentLoaderListener#bundleChanged(BundleEvent)-------//
 
     @Test
     public void getContentInfoFromLockedNode() throws RepositoryException {
         final Bundle bundle = createNewBundle();
-        final Node bcNode = (Node)session.getItem(BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
+        final Node bcNode = (Node) session.getItem(BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
         bcNode.addNode(bundle.getSymbolicName()).addMixin("mix:lockable");
         session.save();
         LockManager lockManager = session.getWorkspace().getLockManager();
-        lockManager.lock(bcNode.getNode(bundle.getSymbolicName()).getPath(), 
-        		false, // isDeep 
-        		true, // isSessionScoped 
-        		Long.MAX_VALUE, // timeoutHint 
-        		null); // ownerInfo
+        lockManager.lock(
+                bcNode.getNode(bundle.getSymbolicName()).getPath(),
+                false, // isDeep
+                true, // isSessionScoped
+                Long.MAX_VALUE, // timeoutHint
+                null); // ownerInfo
 
         assertNull(underTest.getBundleContentInfo(session, bundle, false));
     }
@@ -130,8 +130,8 @@ public class BundleContentLoaderListenerTest {
     @Test
     public void getContentInfoFromNotLockableNode() throws RepositoryException {
         final Bundle bundle = createNewBundle();
-        final Node bcNode = (Node)session.getItem(BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
-        bcNode.addNode(bundle.getSymbolicName()); //Node without lockable mixin
+        final Node bcNode = (Node) session.getItem(BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
+        bcNode.addNode(bundle.getSymbolicName()); // Node without lockable mixin
         session.save();
 
         assertNull(underTest.getBundleContentInfo(session, bundle, false));
@@ -140,11 +140,10 @@ public class BundleContentLoaderListenerTest {
     @Test
     public void getContentInfo() throws RepositoryException {
         final Bundle bundle = createNewBundle();
-        final Node bcNode = (Node)session.getItem(BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
+        final Node bcNode = (Node) session.getItem(BundleContentLoaderListener.BUNDLE_CONTENT_NODE);
         final Node bundleContent = bcNode.addNode(bundle.getSymbolicName());
         bundleContent.addMixin("mix:lockable");
 
-
         Calendar now = Calendar.getInstance();
         bundleContent.setProperty(PROPERTY_CONTENT_LOADED_AT, now);
 
@@ -162,7 +161,7 @@ public class BundleContentLoaderListenerTest {
         assertTrue(props.containsKey(PROPERTY_UNINSTALL_PATHS));
     }
 
-    //-------BundleContentLoaderListener#contentIsUninstalled(Session, Bundle)-------//
+    // -------BundleContentLoaderListener#contentIsUninstalled(Session, Bundle)-------//
 
     @Test
     public void testContentIsUninstalled() throws RepositoryException {
@@ -177,21 +176,21 @@ public class BundleContentLoaderListenerTest {
         assertFalse(bcNode.getProperty(PROPERTY_CONTENT_LOADED).getBoolean());
     }
 
-    //-------BundleContentLoaderListener#getMimeType(String)-------//
+    // -------BundleContentLoaderListener#getMimeType(String)-------//
 
     @Test
-    public void testMimeTypeService(){
+    public void testMimeTypeService() {
         assertEquals("audio/mpeg", underTest.getMimeType("test.mp3"));
     }
 
-    //-------BundleContentLoaderListener#getMimeType(String)-------//
+    // -------BundleContentLoaderListener#getMimeType(String)-------//
 
     @Test
     public void getSessionForWorkspace() throws RepositoryException {
         assertNotNull(underTest.getSession(null));
     }
 
-    private Bundle createNewBundle(){
+    private Bundle createNewBundle() {
         MockBundle b = new MockBundle(context.bundleContext());
         b.setSymbolicName(uniqueId());
         return b;
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderTest.java
index b8741aa..38468ac 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/BundleContentLoaderTest.java
@@ -18,19 +18,6 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import static java.util.Collections.singletonMap;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.annotation.Annotation;
-import java.net.URL;
-import java.security.Principal;
-
 import javax.jcr.AccessDeniedException;
 import javax.jcr.NamespaceException;
 import javax.jcr.RepositoryException;
@@ -43,6 +30,10 @@ import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.Privilege;
 
+import java.lang.annotation.Annotation;
+import java.net.URL;
+import java.security.Principal;
+
 import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.api.JackrabbitWorkspace;
 import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
@@ -65,6 +56,15 @@ import org.junit.Test;
 import org.mockito.Mockito;
 import org.osgi.framework.Bundle;
 
+import static java.util.Collections.singletonMap;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 public class BundleContentLoaderTest {
 
     @Rule
@@ -75,6 +75,7 @@ public class BundleContentLoaderTest {
     private ContentReaderWhiteboard whiteboard;
 
     private static final String CUSTOM_PRIVILEGE_NAME = "customPrivilege";
+
     @Before
     public void prepareContentLoader() throws Exception {
         // prepare content readers
@@ -90,10 +91,10 @@ public class BundleContentLoaderTest {
         bundleHelper = context.registerInjectActivateService(new BundleContentLoaderListener());
 
         whiteboard = context.getService(ContentReaderWhiteboard.class);
-
     }
 
-    private static Privilege getOrRegisterCustomPrivilege(Session session) throws AccessDeniedException, NamespaceException, RepositoryException {
+    private static Privilege getOrRegisterCustomPrivilege(Session session)
+            throws AccessDeniedException, NamespaceException, RepositoryException {
         // register custom privilege
         Workspace wsp = session.getWorkspace();
         if (!(wsp instanceof JackrabbitWorkspace)) {
@@ -111,17 +112,18 @@ public class BundleContentLoaderTest {
         // use JCR API to add some node and acl
         Session session = context.resourceResolver().adaptTo(Session.class);
         Privilege customPrivilege = getOrRegisterCustomPrivilege(session);
-        Privilege[] customPrivilegeSingleItemArray = new Privilege[]{ customPrivilege };
+        Privilege[] customPrivilegeSingleItemArray = new Privilege[] {customPrivilege};
 
         JcrUtils.getOrCreateByPath(path, NodeType.NT_FOLDER, session);
-        
+
         AccessControlManager acMgr = session.getAccessControlManager();
-        AccessControlList acl = (AccessControlList)acMgr.getApplicablePolicies(path).nextAccessControlPolicy();
+        AccessControlList acl =
+                (AccessControlList) acMgr.getApplicablePolicies(path).nextAccessControlPolicy();
         Principal everyone = EveryonePrincipal.getInstance();
         assertTrue(acl.addAccessControlEntry(everyone, customPrivilegeSingleItemArray));
         AccessControlEntry[] expectedAces = acl.getAccessControlEntries();
         acMgr.setPolicy(path, acl);
-        
+
         session.save();
         return expectedAces;
     }
@@ -130,13 +132,15 @@ public class BundleContentLoaderTest {
         Session session = context.resourceResolver().adaptTo(Session.class);
         session.refresh(false);
         assertTrue(session.nodeExists(path));
-        assertEquals(JcrConstants.NT_FOLDER, session.getNode(path).getPrimaryNodeType().getName());
+        assertEquals(
+                JcrConstants.NT_FOLDER,
+                session.getNode(path).getPrimaryNodeType().getName());
         AccessControlManager acMgr = session.getAccessControlManager();
-        AccessControlList acl = (AccessControlList)acMgr.getPolicies(path)[0];
+        AccessControlList acl = (AccessControlList) acMgr.getPolicies(path)[0];
         AccessControlEntry[] aces = acl.getAccessControlEntries();
         assertThat(aces, Matchers.arrayContaining(expectedAces));
     }
- 
+
     @Test
     public void loadContentOverwriteWithoutPath() throws Exception {
         AccessControlEntry[] expectedAces = createFolderNodeAndACL("/apps/child");
@@ -206,8 +210,8 @@ public class BundleContentLoaderTest {
     @Test
     public void loadContentWithExcludes() throws Exception {
 
-        BundleContentLoader contentLoader = new BundleContentLoader(bundleHelper, whiteboard,
-                new BundleContentLoaderConfiguration() {
+        BundleContentLoader contentLoader =
+                new BundleContentLoader(bundleHelper, whiteboard, new BundleContentLoaderConfiguration() {
                     @Override
                     public Class<? extends Annotation> annotationType() {
                         return null;
@@ -215,30 +219,28 @@ public class BundleContentLoaderTest {
 
                     @Override
                     public String[] includedTargets() {
-                        return new String[] { "^/.*$" };
+                        return new String[] {"^/.*$"};
                     }
 
                     @Override
                     public String[] excludedTargets() {
-                        return new String[] { "^/libs.*$" };
+                        return new String[] {"^/libs.*$"};
                     }
-
                 });
 
-        Bundle mockBundle = newBundleWithInitialContent(context, 
-                "SLING-INF/libs/app;path:=/libs/app,SLING-INF/content/app;path:=/content/app");
+        Bundle mockBundle = newBundleWithInitialContent(
+                context, "SLING-INF/libs/app;path:=/libs/app,SLING-INF/content/app;path:=/content/app");
 
         contentLoader.registerBundle(context.resourceResolver().adaptTo(Session.class), mockBundle, false);
 
         assertThat("Excluded resource imported", context.resourceResolver().getResource("/libs/app"), nullValue());
     }
 
-
     @Test
     public void loadContentWithNullValue() throws Exception {
 
-        BundleContentLoader contentLoader = new BundleContentLoader(bundleHelper, whiteboard,
-                new BundleContentLoaderConfiguration() {
+        BundleContentLoader contentLoader =
+                new BundleContentLoader(bundleHelper, whiteboard, new BundleContentLoaderConfiguration() {
                     @Override
                     public Class<? extends Annotation> annotationType() {
                         return null;
@@ -246,30 +248,28 @@ public class BundleContentLoaderTest {
 
                     @Override
                     public String[] includedTargets() {
-                        return new String[] { "^/.*$" };
+                        return new String[] {"^/.*$"};
                     }
 
                     @Override
                     public String[] excludedTargets() {
                         return null;
                     }
-
                 });
 
-        Bundle mockBundle = newBundleWithInitialContent(context,
-                "SLING-INF/libs/app;path:=/libs/app,SLING-INF/content/app;path:=/content/app");
+        Bundle mockBundle = newBundleWithInitialContent(
+                context, "SLING-INF/libs/app;path:=/libs/app,SLING-INF/content/app;path:=/content/app");
 
         contentLoader.registerBundle(context.resourceResolver().adaptTo(Session.class), mockBundle, false);
 
         assertThat("Excluded resource imported", context.resourceResolver().getResource("/libs/app"), notNullValue());
     }
 
-
     @Test
     public void loadContentWithIncludes() throws Exception {
 
-        BundleContentLoader contentLoader = new BundleContentLoader(bundleHelper, whiteboard,
-                new BundleContentLoaderConfiguration() {
+        BundleContentLoader contentLoader =
+                new BundleContentLoader(bundleHelper, whiteboard, new BundleContentLoaderConfiguration() {
                     @Override
                     public Class<? extends Annotation> annotationType() {
                         return null;
@@ -277,22 +277,21 @@ public class BundleContentLoaderTest {
 
                     @Override
                     public String[] includedTargets() {
-                        return new String[] { "^/.*$" };
+                        return new String[] {"^/.*$"};
                     }
 
                     @Override
                     public String[] excludedTargets() {
-                        return new String[] { "^/app.*$" };
+                        return new String[] {"^/app.*$"};
                     }
-
                 });
 
-        Bundle mockBundle = newBundleWithInitialContent(context, 
-                "SLING-INF/libs/app;path:=/libs/app");
+        Bundle mockBundle = newBundleWithInitialContent(context, "SLING-INF/libs/app;path:=/libs/app");
 
         contentLoader.registerBundle(context.resourceResolver().adaptTo(Session.class), mockBundle, false);
 
-        assertThat("Included resource not imported", context.resourceResolver().getResource("/libs/app"), notNullValue());
+        assertThat(
+                "Included resource not imported", context.resourceResolver().getResource("/libs/app"), notNullValue());
     }
 
     @Test
@@ -318,8 +317,8 @@ public class BundleContentLoaderTest {
 
         dumpRepo("/", 2);
 
-        Bundle mockBundle = newBundleWithInitialContent(context, 
-                "SLING-INF/libs/app;path:=/libs/app;ignoreImportProviders:=xml");
+        Bundle mockBundle =
+                newBundleWithInitialContent(context, "SLING-INF/libs/app;path:=/libs/app;ignoreImportProviders:=xml");
 
         contentLoader.registerBundle(context.resourceResolver().adaptTo(Session.class), mockBundle, false);
 
@@ -333,7 +332,6 @@ public class BundleContentLoaderTest {
         dumpRepo("/", 2);
 
         assertThat("XML file was was not imported", xmlFile, notNullValue());
-
     }
 
     @Test
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/CreateNodeTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/CreateNodeTest.java
index 9a4e549..69aa6a2 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/CreateNodeTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/CreateNodeTest.java
@@ -1,34 +1,29 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.AUTO_CHECKOUT;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_NODE;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_PROPERTIES;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.createImportOptions;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import javax.jcr.Node;
+import javax.jcr.Session;
 
 import java.util.HashMap;
 import java.util.UUID;
 
-import javax.jcr.Node;
-import javax.jcr.Session;
-
 import org.apache.sling.jcr.contentloader.ContentReader;
 import org.apache.sling.testing.mock.sling.ResourceResolverType;
 import org.apache.sling.testing.mock.sling.junit.SlingContext;
@@ -36,31 +31,41 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.AUTO_CHECKOUT;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_NODE;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_PROPERTIES;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.createImportOptions;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 /** TODO might need to consolidate this with DefaultContentCreatorTest */
 public class CreateNodeTest {
-    
+
     private DefaultContentCreator contentCreator;
     private Session session;
     private Node testRoot;
-    private final static String DEFAULT_NAME = "default-name";
-    public static final String MIX_VERSIONABLE = "mix:versionable";  
-    
+    private static final String DEFAULT_NAME = "default-name";
+    public static final String MIX_VERSIONABLE = "mix:versionable";
+
     @Rule
     public final SlingContext context = new SlingContext(ResourceResolverType.JCR_OAK);
 
     private final String uniqueId() {
         return getClass().getSimpleName() + UUID.randomUUID();
     }
-    
+
     @Before
     public void setup() throws Exception {
-    	session = context.resourceResolver().adaptTo(Session.class);
+        session = context.resourceResolver().adaptTo(Session.class);
         contentCreator = new DefaultContentCreator(null);
-        contentCreator.init(createImportOptions(OVERWRITE_NODE | OVERWRITE_PROPERTIES | AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | OVERWRITE_PROPERTIES | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                null,
+                null);
         testRoot = session.getRootNode().addNode(getClass().getSimpleName()).addNode(uniqueId());
     }
-    
+
     @Test
     public void testCreateNode() throws Exception {
         contentCreator.prepareParsing(testRoot, DEFAULT_NAME);
@@ -69,4 +74,4 @@ public class CreateNodeTest {
         contentCreator.createNode(name, null, null);
         assertTrue("Expecting " + name + " child node to be created", testRoot.hasNode(name));
     }
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreatorTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreatorTest.java
index 80231f3..b66a0c3 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreatorTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/DefaultContentCreatorTest.java
@@ -1,47 +1,23 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.AUTO_CHECKOUT;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.CHECK_IN;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.NO_OPTIONS;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_NODE;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_PROPERTIES;
-import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.createImportOptions;
-import static org.apache.sling.jcr.contentloader.LocalRestrictionTest.val;
-import static org.apache.sling.jcr.contentloader.LocalRestrictionTest.vals;
-import static org.apache.sling.jcr.contentloader.it.SLING11713InitialContentIT.assertAce;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThrows;
-import static org.junit.Assert.assertTrue;
-
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Node;
 import javax.jcr.PathNotFoundException;
@@ -57,6 +33,18 @@ import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlManager;
 import javax.jcr.security.AccessControlPolicy;
 
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import junitx.util.PrivateAccessor;
 import org.apache.jackrabbit.oak.spi.security.authorization.accesscontrol.AccessControlConstants;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants;
 import org.apache.sling.jcr.base.util.AccessControlUtil;
@@ -73,7 +61,20 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 
-import junitx.util.PrivateAccessor;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.AUTO_CHECKOUT;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.CHECK_IN;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.NO_OPTIONS;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_NODE;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.OVERWRITE_PROPERTIES;
+import static org.apache.sling.jcr.contentloader.ImportOptionsFactory.createImportOptions;
+import static org.apache.sling.jcr.contentloader.LocalRestrictionTest.val;
+import static org.apache.sling.jcr.contentloader.LocalRestrictionTest.vals;
+import static org.apache.sling.jcr.contentloader.it.SLING11713InitialContentIT.assertAce;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
 
 public class DefaultContentCreatorTest {
 
@@ -90,10 +91,13 @@ public class DefaultContentCreatorTest {
 
     @Before
     public void setup() throws Exception {
-    	session = context.resourceResolver().adaptTo(Session.class);
+        session = context.resourceResolver().adaptTo(Session.class);
         contentCreator = new DefaultContentCreator(null);
-        contentCreator.init(createImportOptions(OVERWRITE_NODE|OVERWRITE_PROPERTIES|AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | OVERWRITE_PROPERTIES | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                null,
+                null);
         parentNode = session.getRootNode().addNode(getClass().getSimpleName()).addNode(uniqueId());
     }
 
@@ -101,16 +105,24 @@ public class DefaultContentCreatorTest {
     public void willRewriteUndefinedPropertyType() throws RepositoryException {
         parentNode = mockery.mock(Node.class);
         prop = mockery.mock(Property.class);
-        contentCreator.init(createImportOptions(OVERWRITE_NODE|OVERWRITE_PROPERTIES|AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | OVERWRITE_PROPERTIES | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                null,
+                null);
 
         contentCreator.prepareParsing(parentNode, null);
-        this.mockery.checking(new Expectations() {{
-        	allowing(parentNode).isNodeType("mix:versionable"); will(returnValue(Boolean.FALSE));
-        	allowing(parentNode).getParent(); will(returnValue(null));
-            oneOf (parentNode).hasProperty("foo"); will(returnValue(Boolean.TRUE));
-            oneOf (parentNode).setProperty(with(equal("foo")), with(equal("bar")));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                allowing(parentNode).isNodeType("mix:versionable");
+                will(returnValue(Boolean.FALSE));
+                allowing(parentNode).getParent();
+                will(returnValue(null));
+                oneOf(parentNode).hasProperty("foo");
+                will(returnValue(Boolean.TRUE));
+                oneOf(parentNode).setProperty(with(equal("foo")), with(equal("bar")));
+            }
+        });
         contentCreator.createProperty("foo", PropertyType.UNDEFINED, "bar");
     }
 
@@ -118,15 +130,19 @@ public class DefaultContentCreatorTest {
     public void willNotRewriteUndefinedPropertyType() throws RepositoryException {
         parentNode = mockery.mock(Node.class);
         prop = mockery.mock(Property.class);
-        contentCreator.init(createImportOptions(AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(AUTO_CHECKOUT), new HashMap<String, ContentReader>(), null, null);
 
         contentCreator.prepareParsing(parentNode, null);
-        this.mockery.checking(new Expectations() {{
-            oneOf (parentNode).hasProperty("foo"); will(returnValue(Boolean.TRUE));
-            oneOf (parentNode).getProperty("foo"); will(returnValue(prop));
-            oneOf (prop).isNew(); will(returnValue(Boolean.FALSE));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(parentNode).hasProperty("foo");
+                will(returnValue(Boolean.TRUE));
+                oneOf(parentNode).getProperty("foo");
+                will(returnValue(prop));
+                oneOf(prop).isNew();
+                will(returnValue(Boolean.FALSE));
+            }
+        });
         contentCreator.createProperty("foo", PropertyType.UNDEFINED, "bar");
     }
 
@@ -136,17 +152,21 @@ public class DefaultContentCreatorTest {
         prop = mockery.mock(Property.class);
         parentNode = mockery.mock(Node.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(parentNode).hasProperty(propertyName); will(returnValue(true));
-            oneOf(parentNode).getProperty(propertyName); will(returnValue(prop));
-            oneOf(prop).isNew(); will(returnValue(false));
-        }});
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(parentNode).hasProperty(propertyName);
+                will(returnValue(true));
+                oneOf(parentNode).getProperty(propertyName);
+                will(returnValue(prop));
+                oneOf(prop).isNew();
+                will(returnValue(false));
+            }
+        });
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
-        //By calling this method we expect that it will returns on first if-statement
+        // By calling this method we expect that it will returns on first if-statement
         contentCreator.createProperty("foo", PropertyType.REFERENCE, "bar");
-        //Checking that
+        // Checking that
         mockery.assertIsSatisfied();
     }
 
@@ -161,26 +181,34 @@ public class DefaultContentCreatorTest {
         parentNode = mockery.mock(Node.class);
         prop = mockery.mock(Property.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(session).itemExists(with(any(String.class))); will(returnValue(true));
-            oneOf(session).getItem(with(any(String.class))); will(returnValue(parentNode));
-
-            exactly(2).of(parentNode).getPath(); will(returnValue("/" + rootNodeName));
-            oneOf(parentNode).isNode(); will(returnValue(true));
-            oneOf(parentNode).isNodeType("mix:referenceable"); will(returnValue(true));
-            oneOf(parentNode).getIdentifier(); will(returnValue(uuid));
-            oneOf(parentNode).getSession(); will(returnValue(session));
-            oneOf(parentNode).hasProperty(with(any(String.class)));
-            oneOf(parentNode).setProperty(propertyName, uuid, PropertyType.REFERENCE);
-            oneOf(parentNode).getProperty(with(any(String.class)));
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
-
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
-        contentCreator.prepareParsing(parentNode,null);
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(session).itemExists(with(any(String.class)));
+                will(returnValue(true));
+                oneOf(session).getItem(with(any(String.class)));
+                will(returnValue(parentNode));
+
+                exactly(2).of(parentNode).getPath();
+                will(returnValue("/" + rootNodeName));
+                oneOf(parentNode).isNode();
+                will(returnValue(true));
+                oneOf(parentNode).isNodeType("mix:referenceable");
+                will(returnValue(true));
+                oneOf(parentNode).getIdentifier();
+                will(returnValue(uuid));
+                oneOf(parentNode).getSession();
+                will(returnValue(session));
+                oneOf(parentNode).hasProperty(with(any(String.class)));
+                oneOf(parentNode).setProperty(propertyName, uuid, PropertyType.REFERENCE);
+                oneOf(parentNode).getProperty(with(any(String.class)));
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
+
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.prepareParsing(parentNode, null);
         contentCreator.createProperty(propertyName, PropertyType.REFERENCE, propertyValue);
-        //The only way I found how to test this method is to check numbers of methods calls
+        // The only way I found how to test this method is to check numbers of methods calls
         mockery.assertIsSatisfied();
     }
 
@@ -188,18 +216,20 @@ public class DefaultContentCreatorTest {
     public void testCreateFalseCheckedOutPreperty() throws RepositoryException {
         parentNode = mockery.mock(Node.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(parentNode).hasProperty(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(parentNode).hasProperty(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         int numberOfVersionablesNodes = contentCreator.getVersionables().size();
         contentCreator.createProperty("jcr:isCheckedOut", PropertyType.UNDEFINED, "false");
-        //Checking that list of versionables was changed
-        assertEquals(numberOfVersionablesNodes + 1, contentCreator.getVersionables().size());
+        // Checking that list of versionables was changed
+        assertEquals(
+                numberOfVersionablesNodes + 1, contentCreator.getVersionables().size());
         mockery.assertIsSatisfied();
     }
 
@@ -207,17 +237,18 @@ public class DefaultContentCreatorTest {
     public void testCreateTrueCheckedOutPreperty() throws RepositoryException {
         parentNode = mockery.mock(Node.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(parentNode).hasProperty(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(parentNode).hasProperty(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         int numberOfVersionablesNodes = contentCreator.getVersionables().size();
         contentCreator.createProperty("jcr:isCheckedOut", PropertyType.UNDEFINED, "true");
-        //Checking that list of versionables doesn't changed
+        // Checking that list of versionables doesn't changed
         assertEquals(numberOfVersionablesNodes, contentCreator.getVersionables().size());
         mockery.assertIsSatisfied();
     }
@@ -230,16 +261,19 @@ public class DefaultContentCreatorTest {
         parentNode = mockery.mock(Node.class);
         prop = mockery.mock(Property.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(parentNode).hasProperty(with(any(String.class)));
-            oneOf(parentNode).setProperty(with(any(String.class)), with(any(Calendar.class)));
-            oneOf(parentNode).getProperty(with(any(String.class))); will(returnValue(prop));
-            oneOf(prop).getPath(); will(returnValue(""));
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(parentNode).hasProperty(with(any(String.class)));
+                oneOf(parentNode).setProperty(with(any(String.class)), with(any(Calendar.class)));
+                oneOf(parentNode).getProperty(with(any(String.class)));
+                will(returnValue(prop));
+                oneOf(prop).getPath();
+                will(returnValue(""));
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, null);
 
         contentCreator.createProperty(propertyName, PropertyType.DATE, propertyValue);
@@ -255,31 +289,37 @@ public class DefaultContentCreatorTest {
         parentNode = mockery.mock(Node.class);
         prop = mockery.mock(Property.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(parentNode).hasProperty(with(any(String.class)));
-            oneOf(parentNode).getProperty(propertyName); will(returnValue(prop));
-            oneOf(parentNode).setProperty(propertyName, propertyValue, propertyType);
-            oneOf(prop).getPath(); will(returnValue(""));
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(parentNode).hasProperty(with(any(String.class)));
+                oneOf(parentNode).getProperty(propertyName);
+                will(returnValue(prop));
+                oneOf(parentNode).setProperty(propertyName, propertyValue, propertyType);
+                oneOf(prop).getPath();
+                will(returnValue(""));
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, null);
 
         contentCreator.createProperty(propertyName, propertyType, propertyValue);
         mockery.assertIsSatisfied();
     }
 
-    //----- DefaultContentCreator#createNode(String name, String primaryNodeType, String[] mixinNodeTypes)-------//
+    // ----- DefaultContentCreator#createNode(String name, String primaryNodeType, String[] mixinNodeTypes)-------//
 
     @Test
     public void createNodeWithoutNameAndTwoInStack() throws RepositoryException {
-        contentCreator.init(createImportOptions(OVERWRITE_NODE|OVERWRITE_PROPERTIES|AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, null);
-        //Making parentNodeStack.size() == 1
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | OVERWRITE_PROPERTIES | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                null,
+                null);
+        // Making parentNodeStack.size() == 1
         contentCreator.prepareParsing(parentNode, DEFAULT_NAME);
-        //Making parentNodeStack.size() == 2
+        // Making parentNodeStack.size() == 2
         contentCreator.createNode(uniqueId(), null, null);
 
         assertThrows(RepositoryException.class, () -> {
@@ -287,20 +327,22 @@ public class DefaultContentCreatorTest {
         });
     }
 
-
     @Test
     public void createNodeWithoutProvidedNames() throws RepositoryException, NoSuchFieldException {
         @SuppressWarnings("unchecked")
-		Deque<Node> nodesStack = (Deque<Node>)PrivateAccessor.getField(contentCreator, "parentNodeStack");
+        Deque<Node> nodesStack = (Deque<Node>) PrivateAccessor.getField(contentCreator, "parentNodeStack");
 
-        contentCreator.init(createImportOptions(OVERWRITE_NODE|OVERWRITE_PROPERTIES|AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | OVERWRITE_PROPERTIES | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                null,
+                null);
 
         contentCreator.prepareParsing(parentNode, null);
-        //Contains parentNode only
+        // Contains parentNode only
         assertEquals(1, nodesStack.size());
         contentCreator.createNode(null, null, null);
-        //Node has not been created since any name not provided
+        // Node has not been created since any name not provided
         assertEquals(1, nodesStack.size());
     }
 
@@ -311,12 +353,17 @@ public class DefaultContentCreatorTest {
         final String propertyValue = uniqueId();
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(OVERWRITE_NODE |AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                null,
+                listener);
         contentCreator.prepareParsing(parentNode, DEFAULT_NAME);
 
         Node nodeToOverwrite = parentNode.addNode(newNodeName);
@@ -324,7 +371,7 @@ public class DefaultContentCreatorTest {
 
         assertTrue(parentNode.getNode(newNodeName).hasProperty(propertyName));
         contentCreator.createNode(newNodeName, null, null);
-        //If node was overwritten(as we expect) it will not contain this property
+        // If node was overwritten(as we expect) it will not contain this property
         assertFalse(parentNode.getNode(newNodeName).hasProperty(propertyName));
         mockery.assertIsSatisfied();
     }
@@ -334,10 +381,9 @@ public class DefaultContentCreatorTest {
         final String newNodeName = uniqueId();
         final String[] mixins = {"mix:versionable"};
         @SuppressWarnings("unchecked")
-		final List<Node> versionables = (List<Node>) PrivateAccessor.getField(contentCreator, "versionables");
+        final List<Node> versionables = (List<Node>) PrivateAccessor.getField(contentCreator, "versionables");
 
-        contentCreator.init(createImportOptions(CHECK_IN),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(CHECK_IN), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, DEFAULT_NAME);
 
         Node newNode = parentNode.addNode(newNodeName);
@@ -354,12 +400,17 @@ public class DefaultContentCreatorTest {
         final List<String> createdNodes = new ArrayList<String>();
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(OVERWRITE_NODE |AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), createdNodes, listener);
+        contentCreator.init(
+                createImportOptions(OVERWRITE_NODE | AUTO_CHECKOUT),
+                new HashMap<String, ContentReader>(),
+                createdNodes,
+                listener);
         contentCreator.prepareParsing(parentNode, DEFAULT_NAME);
 
         int createdNodesSize = createdNodes.size();
@@ -371,39 +422,38 @@ public class DefaultContentCreatorTest {
         mockery.assertIsSatisfied();
     }
 
-    //----- DefaultContentCreator#createProperty(String name, int propertyType, String[] values)-------//
+    // ----- DefaultContentCreator#createProperty(String name, int propertyType, String[] values)-------//
 
     @Test
     public void propertyDoesntOverwritten() throws RepositoryException {
         final String newPropertyName = uniqueId();
         final String newPropertyValue = uniqueId();
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, DEFAULT_NAME);
 
         parentNode.setProperty(newPropertyName, newPropertyValue);
         session.save();
-        contentCreator.createProperty(newPropertyName, PropertyType.REFERENCE, new String[]{"bar1", "bar2"});
-        //Checking that property is old
+        contentCreator.createProperty(newPropertyName, PropertyType.REFERENCE, new String[] {"bar1", "bar2"});
+        // Checking that property is old
         assertTrue(!parentNode.getProperty(newPropertyName).isNew());
         assertEquals(newPropertyValue, parentNode.getProperty(newPropertyName).getString());
     }
 
-
     @Test
     public void createReferenceProperty() throws RepositoryException, NoSuchFieldException {
         final String propName = uniqueId();
         final String[] propValues = {uniqueId(), uniqueId()};
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
         @SuppressWarnings("unchecked")
-		final Map<String, String[]> delayedMultipleReferences =
-                (Map<String, String[]>)PrivateAccessor.getField(contentCreator, "delayedMultipleReferences");
-        this.mockery.checking(new Expectations(){{
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
-
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
+        final Map<String, String[]> delayedMultipleReferences =
+                (Map<String, String[]>) PrivateAccessor.getField(contentCreator, "delayedMultipleReferences");
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
+
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, DEFAULT_NAME);
 
         contentCreator.createProperty(propName, PropertyType.REFERENCE, propValues);
@@ -423,13 +473,14 @@ public class DefaultContentCreatorTest {
         final String[] propValues = {"2012-10-01T09:45:00.000+02:00", "2011-02-13T09:45:00.000+02:00"};
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
         parentNode.addMixin("mix:versionable");
 
-        contentCreator.init(createImportOptions(AUTO_CHECKOUT),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(createImportOptions(AUTO_CHECKOUT), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, null);
 
         assertFalse(parentNode.hasProperty(propName));
@@ -448,16 +499,17 @@ public class DefaultContentCreatorTest {
         final String propName = uniqueId();
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
 
-        this.mockery.checking(new Expectations(){{
-            oneOf(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                oneOf(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, null);
 
         assertFalse(parentNode.hasProperty(propName));
-        contentCreator.createProperty(propName, PropertyType.UNDEFINED, new String[]{});
+        contentCreator.createProperty(propName, PropertyType.UNDEFINED, new String[] {});
         assertTrue(parentNode.hasProperty(propName));
         mockery.assertIsSatisfied();
     }
@@ -466,35 +518,35 @@ public class DefaultContentCreatorTest {
     public void createOtherProperty() throws RepositoryException {
         final String propName = uniqueId();
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         assertFalse(parentNode.hasProperty(propName));
-        contentCreator.createProperty(propName, PropertyType.STRING, new String[]{});
+        contentCreator.createProperty(propName, PropertyType.STRING, new String[] {});
         assertTrue(parentNode.hasProperty(propName));
     }
 
-    //------DefaultContentCreator#finishNode()------//
+    // ------DefaultContentCreator#finishNode()------//
 
     @Test
     public void finishNodeWithMultipleProperty() throws RepositoryException, NoSuchFieldException {
         final String propName = uniqueId();
         final String underTestNodeName = uniqueId();
         @SuppressWarnings("unchecked")
-		final Map<String, List<String>> delayedMultipleReferences =
+        final Map<String, List<String>> delayedMultipleReferences =
                 (Map<String, List<String>>) PrivateAccessor.getField(contentCreator, "delayedMultipleReferences");
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
 
-        this.mockery.checking(new Expectations(){{
-            exactly(3).of(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                exactly(3).of(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, null);
 
-        contentCreator.createProperty(propName, PropertyType.REFERENCE, new String[]{underTestNodeName});
+        contentCreator.createProperty(propName, PropertyType.REFERENCE, new String[] {underTestNodeName});
         contentCreator.createNode(underTestNodeName, null, null);
         assertEquals(1, delayedMultipleReferences.size());
 
@@ -512,12 +564,13 @@ public class DefaultContentCreatorTest {
         final String underTestNodeName = uniqueId();
         final ContentImportListener listener = mockery.mock(ContentImportListener.class);
 
-        this.mockery.checking(new Expectations(){{
-            exactly(2).of(listener).onCreate(with(any(String.class)));
-        }});
+        this.mockery.checking(new Expectations() {
+            {
+                exactly(2).of(listener).onCreate(with(any(String.class)));
+            }
+        });
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, listener);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, listener);
         contentCreator.prepareParsing(parentNode, null);
 
         contentCreator.createProperty(propName, PropertyType.REFERENCE, underTestNodeName);
@@ -536,8 +589,7 @@ public class DefaultContentCreatorTest {
         final String propName = uniqueId();
         final String underTestNodeName = uniqueId();
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         contentCreator.createProperty(propName, PropertyType.UNDEFINED, underTestNodeName);
@@ -552,41 +604,46 @@ public class DefaultContentCreatorTest {
         final String propName = uniqueId();
         final String underTestNodeName = uniqueId();
 
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         contentCreator.createProperty(propName, PropertyType.REFERENCE, underTestNodeName);
         contentCreator.createNode(underTestNodeName, null, null);
 
         contentCreator.finishNode();
-        //False since it doesn't have referenceable mixin
+        // False since it doesn't have referenceable mixin
         assertFalse(parentNode.hasProperty(propName));
     }
 
     @Test
     public void createAceWithoutRestrictionsSpecified() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
         contentCreator.createUser(userName, "Test", null);
 
-        contentCreator.createAce(userName, new String[] {PrivilegeConstants.JCR_READ}, 
-                new String[] {PrivilegeConstants.JCR_WRITE}, null);
+        contentCreator.createAce(
+                userName,
+                new String[] {PrivilegeConstants.JCR_READ},
+                new String[] {PrivilegeConstants.JCR_WRITE},
+                null);
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(2, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {}, // RestrictionNames
                 new String[][] {}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {}, // RestrictionNames
@@ -596,63 +653,79 @@ public class DefaultContentCreatorTest {
     @Deprecated
     @Test
     public void createAceWithNonSpecificRestrictions() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
         contentCreator.createUser(userName, "Test", null);
 
-        contentCreator.createAce(userName, new String[] {PrivilegeConstants.JCR_READ}, 
-                new String[] {PrivilegeConstants.JCR_WRITE}, null,
-                Collections.singletonMap(AccessControlConstants.REP_GLOB, val("glob1allow")),  // restrictions
-                Collections.singletonMap(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2")),  // mvRestrictions
+        contentCreator.createAce(
+                userName,
+                new String[] {PrivilegeConstants.JCR_READ},
+                new String[] {PrivilegeConstants.JCR_WRITE},
+                null,
+                Collections.singletonMap(AccessControlConstants.REP_GLOB, val("glob1allow")), // restrictions
+                Collections.singletonMap(
+                        AccessControlConstants.REP_ITEM_NAMES,
+                        vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2")), // mvRestrictions
                 Collections.emptySet()); // removedRestrictionNames
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(2, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
-                new String[] {AccessControlConstants.REP_GLOB, AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}, new String[] {"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+                new String[] {AccessControlConstants.REP_GLOB, AccessControlConstants.REP_ITEM_NAMES
+                }, // RestrictionNames
+                new String[][] {new String[] {"glob1allow"}, new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
-                new String[] {AccessControlConstants.REP_GLOB, AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}, new String[] {"name1", "name2"}}); // RestrictionValues
+                new String[] {AccessControlConstants.REP_GLOB, AccessControlConstants.REP_ITEM_NAMES
+                }, // RestrictionNames
+                new String[][] {new String[] {"glob1allow"}, new String[] {"name1", "name2"}}); // RestrictionValues
     }
 
     @Deprecated
     @Test
     public void createAceWithNullSpecificRestrictions() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
         contentCreator.createUser(userName, "Test", null);
 
-        contentCreator.createAce(userName, new String[] {PrivilegeConstants.JCR_READ}, 
-                new String[] {PrivilegeConstants.JCR_WRITE}, null,
-                null,  // restrictions
-                null,  // mvRestrictions
+        contentCreator.createAce(
+                userName,
+                new String[] {PrivilegeConstants.JCR_READ},
+                new String[] {PrivilegeConstants.JCR_WRITE},
+                null,
+                null, // restrictions
+                null, // mvRestrictions
                 null); // removedRestrictionNames
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(2, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {}, // RestrictionNames
                 new String[][] {}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {}, // RestrictionNames
@@ -661,8 +734,7 @@ public class DefaultContentCreatorTest {
 
     @Test
     public void createAceWithSpecificRestrictions() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -671,35 +743,41 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(2, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
     public void createAceWithSpecificRestrictionsTwice() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -708,11 +786,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
         // call again to verify the old aces are replaced with the new ones
@@ -720,25 +801,28 @@ public class DefaultContentCreatorTest {
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(2, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
     public void createAceWithNullPrivileges() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -749,15 +833,14 @@ public class DefaultContentCreatorTest {
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(0, allEntries.size());
     }
 
     @Test
     public void createAceWithNullPrincipal() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -765,34 +848,39 @@ public class DefaultContentCreatorTest {
 
         // try null principal
         assertThrows("No principal found for id: null", RepositoryException.class, () -> {
-            contentCreator.createAce(null, new String[] {PrivilegeConstants.JCR_READ}, 
-                    new String[] {PrivilegeConstants.JCR_WRITE}, null);
+            contentCreator.createAce(
+                    null,
+                    new String[] {PrivilegeConstants.JCR_READ},
+                    new String[] {PrivilegeConstants.JCR_WRITE},
+                    null);
         });
 
         contentCreator.finishNode();
 
-        //verify ACE was not set.
+        // verify ACE was not set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(0, allEntries.size());
     }
 
     @Test
     public void createAceWithInvalidPrincipal() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
 
         // try non-existing principal
         assertThrows(String.format("No principal found for id: %s", userName), RepositoryException.class, () -> {
-            contentCreator.createAce(userName, new String[] {PrivilegeConstants.JCR_READ}, 
-                    new String[] {PrivilegeConstants.JCR_WRITE}, null);
+            contentCreator.createAce(
+                    userName,
+                    new String[] {PrivilegeConstants.JCR_READ},
+                    new String[] {PrivilegeConstants.JCR_WRITE},
+                    null);
         });
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(0, allEntries.size());
     }
@@ -802,10 +890,10 @@ public class DefaultContentCreatorTest {
         createAceWithOrderBy(null);
     }
 
-    protected void createAceWithOrderBy(String orderBy) throws RepositoryException, ValueFormatException,
-            UnsupportedRepositoryOperationException, PathNotFoundException, AccessDeniedException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+    protected void createAceWithOrderBy(String orderBy)
+            throws RepositoryException, ValueFormatException, UnsupportedRepositoryOperationException,
+                    PathNotFoundException, AccessDeniedException {
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -817,40 +905,51 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
         contentCreator.createAce(groupName, list, orderBy);
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(4, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(2), groupName,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(2),
+                groupName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(3), groupName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(3),
+                groupName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
@@ -860,8 +959,7 @@ public class DefaultContentCreatorTest {
 
     @Test
     public void createAceWithOrderByFirst() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -873,40 +971,51 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
         contentCreator.createAce(groupName, list, "first");
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(4, allEntries.size());
-        assertAce(allEntries.get(0), groupName,
+        assertAce(
+                allEntries.get(0),
+                groupName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), groupName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                groupName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(2), userName,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(2),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(3), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(3),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
@@ -916,8 +1025,7 @@ public class DefaultContentCreatorTest {
 
     @Test
     public void createAceWithOrderByAfter() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -932,11 +1040,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
         contentCreator.createAce(userName2, list, null);
@@ -944,45 +1055,56 @@ public class DefaultContentCreatorTest {
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(6, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(2), groupName,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(2),
+                groupName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(3), groupName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(3),
+                groupName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(4), userName2,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(4),
+                userName2,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(5), userName2,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(5),
+                userName2,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
     public void createAceWithOrderByBefore() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -994,46 +1116,56 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
         contentCreator.createAce(groupName, list, String.format("before %s", userName));
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(4, allEntries.size());
-        assertAce(allEntries.get(0), groupName,
+        assertAce(
+                allEntries.get(0),
+                groupName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), groupName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                groupName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(2), userName,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(2),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(3), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(3),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
     public void createAceWithOrderByAfterInvalid() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -1042,11 +1174,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         assertThrows("No ACE was found for the specified principal: invalid", IllegalArgumentException.class, () -> {
             contentCreator.createAce(userName, list, "after invalid");
@@ -1054,15 +1189,14 @@ public class DefaultContentCreatorTest {
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(0, allEntries.size());
     }
 
     @Test
     public void createAceWithOrderByBeforeInvalid() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -1071,11 +1205,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         assertThrows("No ACE was found for the specified principal: invalid", IllegalArgumentException.class, () -> {
             contentCreator.createAce(userName, list, "before invalid");
@@ -1083,15 +1220,14 @@ public class DefaultContentCreatorTest {
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(0, allEntries.size());
     }
 
     @Test
     public void createAceWithOrderByIndex() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -1106,11 +1242,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         contentCreator.createAce(userName, list, null);
         contentCreator.createAce(userName2, list, null);
@@ -1118,45 +1257,56 @@ public class DefaultContentCreatorTest {
 
         contentCreator.finishNode();
 
-        //verify ACE was set.
+        // verify ACE was set.
         List<AccessControlEntry> allEntries = allEntries();
         assertEquals(6, allEntries.size());
-        assertAce(allEntries.get(0), userName,
+        assertAce(
+                allEntries.get(0),
+                userName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(1), userName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(1),
+                userName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(2), groupName,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(2),
+                groupName,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(3), groupName,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(3),
+                groupName,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
-        assertAce(allEntries.get(4), userName2,
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(4),
+                userName2,
                 false, // isAllow
                 new String[] {PrivilegeConstants.JCR_WRITE}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_ITEM_NAMES}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
-        assertAce(allEntries.get(5), userName2,
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
+        assertAce(
+                allEntries.get(5),
+                userName2,
                 true, // isAllow
                 new String[] {PrivilegeConstants.JCR_READ}, // PrivilegeNames
                 new String[] {AccessControlConstants.REP_GLOB}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
     @Test
     public void createAceWithOrderByInvalid() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -1165,11 +1315,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         assertThrows("Illegal value for the order parameter: invalid", IllegalArgumentException.class, () -> {
             contentCreator.createAce(userName, list, "invalid");
@@ -1180,8 +1333,7 @@ public class DefaultContentCreatorTest {
 
     @Test
     public void createAceWithOrderByIndexTooLarge() throws RepositoryException {
-        contentCreator.init(createImportOptions(NO_OPTIONS),
-                new HashMap<String, ContentReader>(), null, null);
+        contentCreator.init(createImportOptions(NO_OPTIONS), new HashMap<String, ContentReader>(), null, null);
         contentCreator.prepareParsing(parentNode, null);
 
         final String userName = uniqueId();
@@ -1190,11 +1342,14 @@ public class DefaultContentCreatorTest {
         List<LocalPrivilege> list = new ArrayList<>();
         LocalPrivilege readLp = new LocalPrivilege(PrivilegeConstants.JCR_READ);
         readLp.setAllow(true);
-        readLp.setAllowRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
+        readLp.setAllowRestrictions(
+                Collections.singleton(new LocalRestriction(AccessControlConstants.REP_GLOB, val("glob1allow"))));
         list.add(readLp);
         LocalPrivilege writeLp = new LocalPrivilege(PrivilegeConstants.JCR_WRITE);
         writeLp.setDeny(true);
-        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(AccessControlConstants.REP_ITEM_NAMES, vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
+        writeLp.setDenyRestrictions(Collections.singleton(new LocalRestriction(
+                AccessControlConstants.REP_ITEM_NAMES,
+                vals(session.getValueFactory(), PropertyType.NAME, "name1", "name2"))));
         list.add(writeLp);
         assertThrows("Index value is too large: 100", IndexOutOfBoundsException.class, () -> {
             contentCreator.createAce(userName, list, "100");
@@ -1203,14 +1358,16 @@ public class DefaultContentCreatorTest {
         contentCreator.finishNode();
     }
 
-    protected List<AccessControlEntry> allEntries() throws UnsupportedRepositoryOperationException, RepositoryException,
-            PathNotFoundException, AccessDeniedException {
+    protected List<AccessControlEntry> allEntries()
+            throws UnsupportedRepositoryOperationException, RepositoryException, PathNotFoundException,
+                    AccessDeniedException {
         AccessControlManager accessControlManager = AccessControlUtil.getAccessControlManager(session);
         AccessControlPolicy[] policies = accessControlManager.getPolicies(parentNode.getPath());
         List<AccessControlEntry> allEntries = new ArrayList<AccessControlEntry>();
         for (AccessControlPolicy accessControlPolicy : policies) {
             if (accessControlPolicy instanceof AccessControlList) {
-                AccessControlEntry[] accessControlEntries = ((AccessControlList) accessControlPolicy).getAccessControlEntries();
+                AccessControlEntry[] accessControlEntries =
+                        ((AccessControlList) accessControlPolicy).getAccessControlEntries();
                 allEntries.addAll(Arrays.asList(accessControlEntries));
             }
         }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/JsonReaderTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/JsonReaderTest.java
index 753ede8..106f0e6 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/JsonReaderTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/JsonReaderTest.java
@@ -1,21 +1,26 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 package org.apache.sling.jcr.contentloader.internal;
 
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -25,12 +30,9 @@ import java.util.Collection;
 import java.util.LinkedHashMap;
 import java.util.List;
 
-import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
 import jakarta.json.Json;
 import jakarta.json.JsonArrayBuilder;
 import jakarta.json.JsonWriter;
-
 import org.apache.sling.jcr.contentloader.ContentCreator;
 import org.apache.sling.jcr.contentloader.LocalPrivilege;
 import org.apache.sling.jcr.contentloader.internal.readers.JsonReader;
@@ -148,7 +150,7 @@ public class JsonReaderTest {
 
     @org.junit.Test
     public void testMixinNodeTypes1() throws Exception {
-        final String[] mixins = new String[] { "xyz:mix1" };
+        final String[] mixins = new String[] {"xyz:mix1"};
         String json = "{ \"jcr:mixinTypes\": " + this.toJsonArray(mixins) + "}";
 
         this.mockery.checking(new Expectations() {
@@ -166,7 +168,7 @@ public class JsonReaderTest {
 
     @org.junit.Test
     public void testMixinNodeTypes2() throws Exception {
-        final String[] mixins = new String[] { "xyz:mix1", "abc:mix2" };
+        final String[] mixins = new String[] {"xyz:mix1", "abc:mix2"};
         String json = "{ \"jcr:mixinTypes\": " + this.toJsonArray(mixins) + "}";
 
         this.mockery.checking(new Expectations() {
@@ -270,7 +272,7 @@ public class JsonReaderTest {
             {
                 allowing(creator).createNode(null, null, null);
                 inSequence(mySequence);
-                allowing(creator).createProperty("p1", PropertyType.UNDEFINED, new String[] { "v1" });
+                allowing(creator).createProperty("p1", PropertyType.UNDEFINED, new String[] {"v1"});
                 inSequence(mySequence);
                 allowing(creator).finishNode();
                 inSequence(mySequence);
@@ -289,8 +291,8 @@ public class JsonReaderTest {
             {
                 allowing(creator).createNode(null, null, null);
                 inSequence(mySequence);
-                allowing(creator).createProperty("p1", PropertyType.DATE,
-                        new String[] { "2009-09-24T16:32:57.948-07:00" });
+                allowing(creator)
+                        .createProperty("p1", PropertyType.DATE, new String[] {"2009-09-24T16:32:57.948-07:00"});
                 inSequence(mySequence);
                 allowing(creator).finishNode();
                 inSequence(mySequence);
@@ -347,7 +349,7 @@ public class JsonReaderTest {
             {
                 allowing(creator).createNode(null, null, null);
                 inSequence(mySequence);
-                allowing(creator).createNode("c1", null, new String[] { "xyz:TestType" });
+                allowing(creator).createNode("c1", null, new String[] {"xyz:TestType"});
                 inSequence(mySequence);
                 allowing(creator).finishNode();
                 inSequence(mySequence);
@@ -438,8 +440,9 @@ public class JsonReaderTest {
                 allowing(creator).createNode(null, null, null);
                 allowing(creator).createUser("username1", "pwd1", map);
                 allowing(creator).createUser("username2", "pwd2", new LinkedHashMap<String, Object>());
-                allowing(creator).createGroup("group1", new String[] { "username1", "username2" },
-                        new LinkedHashMap<String, Object>());
+                allowing(creator)
+                        .createGroup(
+                                "group1", new String[] {"username1", "username2"}, new LinkedHashMap<String, Object>());
 
                 allowing(creator).finishNode();
                 inSequence(mySequence);
@@ -455,9 +458,9 @@ public class JsonReaderTest {
      * @param localPrivileges the privileges to make a collection
      * @return collection of local privileges
      */
-    private Collection<LocalPrivilege> toCollection(LocalPrivilege ... localPrivileges) {
+    private Collection<LocalPrivilege> toCollection(LocalPrivilege... localPrivileges) {
         List<LocalPrivilege> list = new ArrayList<>();
-        for (LocalPrivilege lp: localPrivileges) {
+        for (LocalPrivilege lp : localPrivileges) {
             list.add(lp);
         }
         return list;
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/SLING11203Test.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/SLING11203Test.java
index d06d281..c6bf5fe 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/SLING11203Test.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/SLING11203Test.java
@@ -18,15 +18,11 @@
  */
 package org.apache.sling.jcr.contentloader.internal;
 
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
+import javax.jcr.Session;
 
 import java.lang.reflect.Field;
 import java.util.Collections;
 
-import javax.jcr.Session;
-
 import org.apache.sling.jcr.contentloader.ContentReader;
 import org.apache.sling.jcr.contentloader.internal.readers.JsonReader;
 import org.apache.sling.jcr.contentloader.internal.readers.OrderedJsonReader;
@@ -43,6 +39,10 @@ import org.junit.runner.Description;
 import org.osgi.framework.Bundle;
 import org.slf4j.LoggerFactory;
 
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
 /**
  * Testing content loader waiting for required content reader
  */
@@ -71,9 +71,8 @@ public class SLING11203Test {
          */
         @Override
         protected void finished(Description description) {
-           logger.info("Finished test: {}", description.getMethodName());
+            logger.info("Finished test: {}", description.getMethodName());
         }
-
     };
 
     @Before
@@ -89,7 +88,6 @@ public class SLING11203Test {
 
         // register the content loader service
         bundleHelper = context.registerInjectActivateService(new BundleContentLoaderListener());
-
     }
 
     @Test
@@ -97,9 +95,15 @@ public class SLING11203Test {
         loadContentWithDirective();
 
         // check node was not added during parsing the file
-        assertThat("Included resource should not have been imported", context.resourceResolver().getResource("/libs/app"), nullValue());
+        assertThat(
+                "Included resource should not have been imported",
+                context.resourceResolver().getResource("/libs/app"),
+                nullValue());
         // check file was not loaded as non-parsed file
-        assertThat("Included resource should not have been imported", context.resourceResolver().getResource("/libs/app.sling11203"), nullValue());
+        assertThat(
+                "Included resource should not have been imported",
+                context.resourceResolver().getResource("/libs/app.sling11203"),
+                nullValue());
     }
 
     @Test
@@ -110,9 +114,15 @@ public class SLING11203Test {
         loadContentWithDirective();
 
         // check node was added during parsing the file
-        assertThat("Included resource should have been imported", context.resourceResolver().getResource("/libs/app"), notNullValue());
+        assertThat(
+                "Included resource should have been imported",
+                context.resourceResolver().getResource("/libs/app"),
+                notNullValue());
         // check file was not loaded as non-parsed file
-        assertThat("Included resource should not have been imported", context.resourceResolver().getResource("/libs/app.sling11203"), nullValue());
+        assertThat(
+                "Included resource should not have been imported",
+                context.resourceResolver().getResource("/libs/app.sling11203"),
+                nullValue());
     }
 
     @Test
@@ -120,34 +130,49 @@ public class SLING11203Test {
         loadContentWithDirective();
 
         // check node was not added during parsing the file
-        assertThat("Included resource should not have been imported", context.resourceResolver().getResource("/libs/app"), nullValue());
+        assertThat(
+                "Included resource should not have been imported",
+                context.resourceResolver().getResource("/libs/app"),
+                nullValue());
         // check file was not loaded as non-parsed file
-        assertThat("Included resource should not have been imported", context.resourceResolver().getResource("/libs/app.sling11203"), nullValue());
+        assertThat(
+                "Included resource should not have been imported",
+                context.resourceResolver().getResource("/libs/app.sling11203"),
+                nullValue());
 
         // register the content reader that we require
         registerCustomContentReader();
 
         // check node was added during parsing the file
-        assertThat("Included resource should have been imported", context.resourceResolver().getResource("/libs/app"), notNullValue());
+        assertThat(
+                "Included resource should have been imported",
+                context.resourceResolver().getResource("/libs/app"),
+                notNullValue());
         // check file was not loaded as non-parsed file
-        assertThat("Included resource should not have been imported", context.resourceResolver().getResource("/libs/app.sling11203"), nullValue());
+        assertThat(
+                "Included resource should not have been imported",
+                context.resourceResolver().getResource("/libs/app.sling11203"),
+                nullValue());
     }
 
     protected void registerCustomContentReader() {
         // register the content reader that we require after registering the bundle
         //   to trigger the retry
-        context.registerService(ContentReader.class, new SLING11203XmlReader(), 
+        context.registerService(
+                ContentReader.class,
+                new SLING11203XmlReader(),
                 Collections.singletonMap(ContentReader.PROPERTY_EXTENSIONS, "sling11203"));
     }
 
     protected void loadContentWithDirective() throws Exception {
         // dig the BundleContentLoader out of the component field so we get the
         //  same instance so the state for the retry logic is there
-        Field privateBundleContentLoaderField = BundleContentLoaderListener.class.getDeclaredField("bundleContentLoader");
+        Field privateBundleContentLoaderField =
+                BundleContentLoaderListener.class.getDeclaredField("bundleContentLoader");
         privateBundleContentLoaderField.setAccessible(true);
-        BundleContentLoader contentLoader = (BundleContentLoader)privateBundleContentLoaderField.get(bundleHelper);
+        BundleContentLoader contentLoader = (BundleContentLoader) privateBundleContentLoaderField.get(bundleHelper);
 
-        // requireImportProviders directive, so it should check if the specified 
+        // requireImportProviders directive, so it should check if the specified
         //  required content reader is available
         String initialContentHeader = "SLING-INF3/libs;path:=/libs;requireImportProviders:=sling11203";
         Bundle mockBundle = BundleContentLoaderTest.newBundleWithInitialContent(context, initialContentHeader);
@@ -164,7 +189,5 @@ public class SLING11203Test {
             super();
             activate();
         }
-
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/hc/BundleContentLoadedCheckTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/hc/BundleContentLoadedCheckTest.java
index 5726157..ac1b36e 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/hc/BundleContentLoadedCheckTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/hc/BundleContentLoadedCheckTest.java
@@ -18,13 +18,10 @@
  */
 package org.apache.sling.jcr.contentloader.internal.hc;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import javax.jcr.Session;
 
 import java.lang.annotation.Annotation;
 
-import javax.jcr.Session;
-
 import org.apache.felix.hc.api.Result;
 import org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck;
 import org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck.Config;
@@ -48,10 +45,14 @@ import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 public class BundleContentLoadedCheckTest {
 
     @Rule
     public final SlingContext context = new SlingContext(ResourceResolverType.JCR_OAK);
+
     private MockBundle bundle;
     private Mockery mock = new Mockery();
     private BundleContentLoader contentLoader;
@@ -81,7 +82,7 @@ public class BundleContentLoadedCheckTest {
         mock.checking(new Expectations() {
             {
                 oneOf(bundleContext).getBundles();
-                will(returnValue(new Bundle[] { bundle }));
+                will(returnValue(new Bundle[] {bundle}));
             }
         });
         check = context.registerInjectActivateService(new BundleContentLoadedCheck());
@@ -99,7 +100,7 @@ public class BundleContentLoadedCheckTest {
 
             @Override
             public String[] hc_tags() {
-                return new String[] { "test" };
+                return new String[] {"test"};
             }
 
             @Override
@@ -121,7 +122,6 @@ public class BundleContentLoadedCheckTest {
             public String webconsole_configurationFactory_nameHint() {
                 return null;
             }
-
         });
     }
 
@@ -137,5 +137,4 @@ public class BundleContentLoadedCheckTest {
         Result result = check.execute();
         assertTrue(result.isOk());
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/MockContentCreator.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/MockContentCreator.java
index bfc4851..a91ba45 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/MockContentCreator.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/MockContentCreator.java
@@ -18,6 +18,9 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -29,12 +32,9 @@ import java.util.Map;
 import java.util.Set;
 import java.util.Stack;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-
 import org.apache.sling.jcr.contentloader.ContentCreator;
 
-@SuppressWarnings("serial") 
+@SuppressWarnings("serial")
 class MockContentCreator extends Stack<Map<String, Object>> implements ContentCreator {
 
     public static class FileDescription {
@@ -55,11 +55,9 @@ class MockContentCreator extends Stack<Map<String, Object>> implements ContentCr
 
     public List<MockContentCreator.FileDescription> filesCreated = new ArrayList<MockContentCreator.FileDescription>();
 
-    public MockContentCreator() {
-    }
+    public MockContentCreator() {}
 
-    public void createNode(String name, String primaryNodeType, String[] mixinNodeTypes)
-            throws RepositoryException {
+    public void createNode(String name, String primaryNodeType, String[] mixinNodeTypes) throws RepositoryException {
         Map<String, Object> map = new HashMap<>();
         map.put("name", name);
         map.put("primaryNodeType", primaryNodeType);
@@ -67,14 +65,14 @@ class MockContentCreator extends Stack<Map<String, Object>> implements ContentCr
         this.push(map);
     }
 
-    public void finishNode() throws RepositoryException {
-    }
+    public void finishNode() throws RepositoryException {}
 
     protected void recordProperty(String name, Object value) {
         if (!isEmpty()) {
             Map<String, Object> map = peek();
             @SuppressWarnings("unchecked")
-            Map<String, Object> propsMap = (Map<String, Object>)map.computeIfAbsent("properties", key -> new HashMap<>());
+            Map<String, Object> propsMap =
+                    (Map<String, Object>) map.computeIfAbsent("properties", key -> new HashMap<>());
             propsMap.put(name, value);
         }
     }
@@ -109,34 +107,33 @@ class MockContentCreator extends Stack<Map<String, Object>> implements ContentCr
     }
 
     public void createAce(String principal, String[] grantedPrivileges, String[] deniedPrivileges, String order)
-            throws RepositoryException {
-    }
+            throws RepositoryException {}
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see
      * org.apache.sling.jcr.contentloader.ContentCreator#createAce(java.lang.String,
      * java.lang.String[], java.lang.String[], java.lang.String, java.util.Map,
      * java.util.Map, java.util.Set)
      */
     @Override
-    public void createAce(String principal, String[] grantedPrivileges, String[] deniedPrivileges, String order,
-            Map<String, Value> restrictions, Map<String, Value[]> mvRestrictions,
-            Set<String> removedRestrictionNames) throws RepositoryException {
-    }
+    public void createAce(
+            String principal,
+            String[] grantedPrivileges,
+            String[] deniedPrivileges,
+            String order,
+            Map<String, Value> restrictions,
+            Map<String, Value[]> mvRestrictions,
+            Set<String> removedRestrictionNames)
+            throws RepositoryException {}
 
     public void createGroup(String name, String[] members, Map<String, Object> extraProperties)
-            throws RepositoryException {
-    }
+            throws RepositoryException {}
 
     public void createUser(String name, String password, Map<String, Object> extraProperties)
-            throws RepositoryException {
-    }
+            throws RepositoryException {}
 
     @Override
-    public void finish() throws RepositoryException {
-
-    }
-
+    public void finish() throws RepositoryException {}
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReaderTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReaderTest.java
index 8eaf7f6..882cc6d 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReaderTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/OrderedJsonReaderTest.java
@@ -33,22 +33,31 @@ public class OrderedJsonReaderTest extends JsonReaderTest {
         this.jsonReader = new OrderedJsonReader();
     }
 
-    @org.junit.Test public void testTwoOrderedChildren() throws Exception {
-        String json = "{ " +
-                " \"SLING:ordered\" : [" +
-                        "{ \"SLING:name\": \"c1\"}," +
-                        "{ \"SLING:name\": \"c2\"}" +
-                    "]" +
-                "}";
-        this.mockery.checking(new Expectations() {{
-            allowing(creator).createNode(null, null, null); inSequence(mySequence);
-            allowing(creator).createNode("c1", null, null); inSequence(mySequence);
-            allowing(creator).finishNode(); inSequence(mySequence);
-            allowing(creator).createNode("c2", null, null); inSequence(mySequence);
-            allowing(creator).finishNode(); inSequence(mySequence);
-            allowing(creator).finishNode(); inSequence(mySequence);
-            allowing(creator).finish(); inSequence(mySequence);
-        }});
+    @org.junit.Test
+    public void testTwoOrderedChildren() throws Exception {
+        String json = "{ " + " \"SLING:ordered\" : ["
+                + "{ \"SLING:name\": \"c1\"},"
+                + "{ \"SLING:name\": \"c2\"}"
+                + "]"
+                + "}";
+        this.mockery.checking(new Expectations() {
+            {
+                allowing(creator).createNode(null, null, null);
+                inSequence(mySequence);
+                allowing(creator).createNode("c1", null, null);
+                inSequence(mySequence);
+                allowing(creator).finishNode();
+                inSequence(mySequence);
+                allowing(creator).createNode("c2", null, null);
+                inSequence(mySequence);
+                allowing(creator).finishNode();
+                inSequence(mySequence);
+                allowing(creator).finishNode();
+                inSequence(mySequence);
+                allowing(creator).finish();
+                inSequence(mySequence);
+            }
+        });
         this.parse(json);
     }
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
index 9df7b17..9e47d5e 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/XmlReaderTest.java
@@ -18,8 +18,7 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertThrows;
+import javax.jcr.RepositoryException;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
@@ -29,10 +28,11 @@ import java.net.URL;
 import java.util.Date;
 import java.util.Map;
 
-import javax.jcr.RepositoryException;
-
 import junit.framework.TestCase;
 
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertThrows;
+
 public class XmlReaderTest extends TestCase {
 
     private XmlReader reader;
@@ -64,7 +64,9 @@ public class XmlReaderTest extends TestCase {
             // Expected
         }
         assertEquals("mimeType mismatch", "application/test", file.mimeType);
-        assertEquals("lastModified mismatch", XmlReader.FileDescription.createDateFormat().parse("1977-06-01T07:00:00+0100"),
+        assertEquals(
+                "lastModified mismatch",
+                XmlReader.FileDescription.createDateFormat().parse("1977-06-01T07:00:00+0100"),
                 new Date(file.lastModified));
         assertEquals("Could not read file", "This is a test file.", file.content);
     }
@@ -81,13 +83,13 @@ public class XmlReaderTest extends TestCase {
         Map<String, Object> map = creator.get(0);
         assertEquals("nodeName", map.get("name"));
         assertEquals("type", map.get("primaryNodeType"));
-        assertArrayEquals(new String[] {"mixtype1", "mixtype2"}, (String[])map.get("mixinNodeTypes"));
+        assertArrayEquals(new String[] {"mixtype1", "mixtype2"}, (String[]) map.get("mixinNodeTypes"));
 
         @SuppressWarnings("unchecked")
-        Map<String, Object> propsMap = (Map<String, Object>)map.get("properties");
+        Map<String, Object> propsMap = (Map<String, Object>) map.get("properties");
         assertNotNull(propsMap);
         assertEquals("propValue", propsMap.get("propName"));
-        assertArrayEquals(new String[] {"propValue1", "propValue2"}, (String[])propsMap.get("multiPropName"));
+        assertArrayEquals(new String[] {"propValue1", "propValue2"}, (String[]) propsMap.get("multiPropName"));
         assertNull(propsMap.get("multiPropName2"));
     }
 
@@ -110,9 +112,8 @@ public class XmlReaderTest extends TestCase {
         long originalLastModified = file.lastModified();
         assertEquals("Did not create expected number of files", 1, creator.filesCreated.size());
         MockContentCreator.FileDescription fileDescription = creator.filesCreated.get(0);
-        assertEquals("Did not pick up last modified date from file", originalLastModified,
-                fileDescription.lastModified);
-
+        assertEquals(
+                "Did not pick up last modified date from file", originalLastModified, fileDescription.lastModified);
     }
 
     protected void setUp() throws Exception {
@@ -130,38 +131,43 @@ public class XmlReaderTest extends TestCase {
     }
 
     public void testMalformedXmlUnexpectedPropertyElement() throws Exception {
-        malformedXmlTest("<property/>",
+        malformedXmlTest(
+                "<property/>",
                 "XML file does not seem to contain valid content xml. Expected name element for property in : null");
     }
 
     public void testMalformedXmlUnexpectedNameElement() throws Exception {
-        malformedXmlTest("<name></name>",
+        malformedXmlTest(
+                "<name></name>",
                 "XML file does not seem to contain valid content xml. Unexpected name element in : null");
     }
 
     public void testMalformedXmlUnexpectedValueElement() throws Exception {
-        malformedXmlTest("<value></value>",
+        malformedXmlTest(
+                "<value></value>",
                 "XML file does not seem to contain valid content xml. Unexpected value element in : null");
     }
 
     public void testMalformedXmlUnexpectedValuesElement() throws Exception {
-        malformedXmlTest("<values></values>",
+        malformedXmlTest(
+                "<values></values>",
                 "XML file does not seem to contain valid content xml. Unexpected values element in : null");
     }
 
     public void testMalformedXmlUnexpectedTypeElement() throws Exception {
-        malformedXmlTest("<type></type>",
+        malformedXmlTest(
+                "<type></type>",
                 "XML file does not seem to contain valid content xml. Unexpected type element in : null");
     }
 
     public void testMalformedXmlUnexpectedPrimaryNodeTypeElement() throws Exception {
-        malformedXmlTest("<primaryNodeType></primaryNodeType>",
+        malformedXmlTest(
+                "<primaryNodeType></primaryNodeType>",
                 "Element is not allowed at this location: primaryNodeType in null");
     }
 
     public void testMalformedXmlUnexpectedMixinNodeTypeElement() throws Exception {
-        malformedXmlTest("<mixinNodeType></mixinNodeType>",
-                "Element is not allowed at this location: mixinNodeType in null");
+        malformedXmlTest(
+                "<mixinNodeType></mixinNodeType>", "Element is not allowed at this location: mixinNodeType in null");
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReaderTest.java b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReaderTest.java
index 5244db6..2702d38 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReaderTest.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/internal/readers/ZipReaderTest.java
@@ -18,13 +18,6 @@
  */
 package org.apache.sling.jcr.contentloader.internal.readers;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThrows;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.CALLS_REAL_METHODS;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -44,6 +37,13 @@ import org.junit.Test;
 import org.mockito.MockedStatic;
 import org.mockito.Mockito;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+
 public class ZipReaderTest {
 
     private ZipReader reader;
@@ -73,7 +73,6 @@ public class ZipReaderTest {
             public double thresholdRatio() {
                 return 3.0;
             }
-
         };
         reader.activate(config);
         creator = new MockContentCreator();
@@ -82,6 +81,7 @@ public class ZipReaderTest {
     private interface ZipPopulate {
         public void populate(ZipOutputStream zipOut) throws IOException;
     }
+
     protected byte[] generateZip(ZipPopulate populateFn) throws IOException {
         try (ByteArrayOutputStream out = new ByteArrayOutputStream();
                 ZipOutputStream zipOut = new ZipOutputStream(out)) {
@@ -105,10 +105,10 @@ public class ZipReaderTest {
         Random random = new Random();
 
         String generatedString = random.ints(leftLimit, rightLimit + 1)
-          .filter(i -> (i <= 57 || i >= 65) && (i <= 90 || i >= 97))
-          .limit(targetStringLength)
-          .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
-          .toString();
+                .filter(i -> (i <= 57 || i >= 65) && (i <= 90 || i >= 97))
+                .limit(targetStringLength)
+                .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
+                .toString();
 
         return generatedString.getBytes();
     }
@@ -158,7 +158,7 @@ public class ZipReaderTest {
     public void totalEntryCountExceeded() throws Exception {
         // generate a zip with too many entries
         byte[] zipBytes = generateZip(zipOut -> {
-            for (int i=0; i < 6; i++) {
+            for (int i = 0; i < 6; i++) {
                 ZipEntry entry = new ZipEntry(String.format("entry%d", i));
                 zipOut.putNextEntry(entry);
                 zipOut.write(String.format("Hello %d", i).getBytes());
@@ -199,7 +199,7 @@ public class ZipReaderTest {
             zipOut.putNextEntry(entry);
             // a string of all the same characters will have a high
             // compression ratio
-            for (int i=0; i < 1000; i++) {
+            for (int i = 0; i < 1000; i++) {
                 zipOut.write('a');
             }
             zipOut.closeEntry();
@@ -253,13 +253,16 @@ public class ZipReaderTest {
         try {
             final File finalTempFile = ZipReader.createTempFile();
             tempFile = finalTempFile;
-            try (MockedStatic<Files> filesMock = Mockito.mockStatic(Files.class);) {
-                filesMock.when(() -> Files.delete(finalTempFile.toPath()))
-                    .thenThrow(new IOException("simulating ioexception during delete"));
+            try (MockedStatic<Files> filesMock = Mockito.mockStatic(Files.class); ) {
+                filesMock
+                        .when(() -> Files.delete(finalTempFile.toPath()))
+                        .thenThrow(new IOException("simulating ioexception during delete"));
 
                 String err = doWorkWithCapturedSystemErr(() -> ZipReader.removeTempFile(finalTempFile));
-                assertTrue("Expected warning logged about IOException wile removing the temp file",
-                        err.contains("WARN org.apache.sling.jcr.contentloader.internal.readers.ZipReader - Failed to remove the temp file"));
+                assertTrue(
+                        "Expected warning logged about IOException wile removing the temp file",
+                        err.contains(
+                                "WARN org.apache.sling.jcr.contentloader.internal.readers.ZipReader - Failed to remove the temp file"));
             }
         } finally {
             ZipReader.removeTempFile(tempFile);
@@ -286,27 +289,23 @@ public class ZipReaderTest {
 
     /**
      * Helper that simulates an IOException thrown during creation of temp file
-     * 
+     *
      * @param fileMock the file mock to use
      * @param expectedMsg the message expected in the IOException
      */
     private void createTempFileIOException(final File fileMock, final String expectedMsg) throws Exception {
         doWorkAsNotUnix(() -> {
             Path pathMock = (Path) Proxy.newProxyInstance(
-                    Path.class.getClassLoader(), 
-                    new Class[] { Path.class }, 
-                    (proxy, method, methodArgs) -> {
-                      if (method.getName().equals("toFile")) {
-                          return fileMock;
-                      } else {
-                          throw new UnsupportedOperationException(
-                            "Unsupported method: " + method.getName());
-                      }
-                  });
-
-            try (MockedStatic<Files> filesMock = Mockito.mockStatic(Files.class);) {
-                filesMock.when(() -> Files.createTempFile("zipentry", ".tmp"))
-                    .thenReturn(pathMock);
+                    Path.class.getClassLoader(), new Class[] {Path.class}, (proxy, method, methodArgs) -> {
+                        if (method.getName().equals("toFile")) {
+                            return fileMock;
+                        } else {
+                            throw new UnsupportedOperationException("Unsupported method: " + method.getName());
+                        }
+                    });
+
+            try (MockedStatic<Files> filesMock = Mockito.mockStatic(Files.class); ) {
+                filesMock.when(() -> Files.createTempFile("zipentry", ".tmp")).thenReturn(pathMock);
                 IOException ioe = assertThrows(IOException.class, () -> ZipReader.createTempFile());
                 assertEquals(expectedMsg, ioe.getMessage());
             }
@@ -326,9 +325,8 @@ public class ZipReaderTest {
      * @param worker the worker
      */
     static void doWorkAsNotUnix(RunnableWithExceptions worker) throws Exception {
-        try (MockedStatic<ZipReader> zipReaderMock = Mockito.mockStatic(ZipReader.class, CALLS_REAL_METHODS);) {
-            zipReaderMock.when(() -> ZipReader.isOsUnix())
-                .thenReturn(false);
+        try (MockedStatic<ZipReader> zipReaderMock = Mockito.mockStatic(ZipReader.class, CALLS_REAL_METHODS); ) {
+            zipReaderMock.when(() -> ZipReader.isOsUnix()).thenReturn(false);
 
             // do the work
             worker.run();
@@ -350,7 +348,7 @@ public class ZipReaderTest {
             // switch to the capture stream
             System.setErr(ps);
 
-            //do the work
+            // do the work
             worker.run();
         } finally {
             // Put things back
@@ -359,5 +357,4 @@ public class ZipReaderTest {
         }
         return baos.toString();
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/BasicInitialContentIT.java b/src/test/java/org/apache/sling/jcr/contentloader/it/BasicInitialContentIT.java
index c83c4ee..37b3b03 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/BasicInitialContentIT.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/BasicInitialContentIT.java
@@ -18,16 +18,12 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
+import javax.jcr.RepositoryException;
 
 import java.io.IOException;
 
-import javax.jcr.RepositoryException;
-
+import com.google.common.collect.ImmutableListMultimap;
+import com.google.common.collect.Multimap;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -38,8 +34,11 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.Multimap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
 /**
  * Basic test of a bundle that provides initial content
@@ -52,21 +51,16 @@ public class BasicInitialContentIT extends ContentloaderTestSupport {
     public Option[] configuration() throws IOException {
         final String header = DEFAULT_PATH_IN_BUNDLE + ";path:=" + CONTENT_ROOT_PATH;
         final Multimap<String, String> content = ImmutableListMultimap.of(
-            DEFAULT_PATH_IN_BUNDLE, "basic-content.json",
-            DEFAULT_PATH_IN_BUNDLE, "simple-folder/test1.txt",
-            DEFAULT_PATH_IN_BUNDLE, "folder-with-descriptor.json",
-            DEFAULT_PATH_IN_BUNDLE, "folder-with-descriptor/test2.txt"
-        );
+                DEFAULT_PATH_IN_BUNDLE, "basic-content.json",
+                DEFAULT_PATH_IN_BUNDLE, "simple-folder/test1.txt",
+                DEFAULT_PATH_IN_BUNDLE, "folder-with-descriptor.json",
+                DEFAULT_PATH_IN_BUNDLE, "folder-with-descriptor/test2.txt");
         final Option bundle = buildInitialContentBundle(header, content);
         // configure the health check component
         Option hcConfig = factoryConfiguration("org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck")
-            .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
-            .asOption();
-        return options(
-            baseConfiguration(),
-            hcConfig,
-            bundle
-        );
+                .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
+                .asOption();
+        return options(baseConfiguration(), hcConfig, bundle);
     }
 
     /* (non-Javadoc)
@@ -76,7 +70,7 @@ public class BasicInitialContentIT extends ContentloaderTestSupport {
     @Override
     public void setup() throws Exception {
         super.setup();
-        
+
         waitForContentLoaded();
     }
 
@@ -91,29 +85,43 @@ public class BasicInitialContentIT extends ContentloaderTestSupport {
     public void initialContentInstalled() throws RepositoryException {
         final String testNodePath = CONTENT_ROOT_PATH + "/basic-content/test-node";
         assertTrue("Expecting initial content to be installed", session.itemExists(testNodePath));
-        assertEquals("Expecting foo=bar", "bar", session.getNode(testNodePath).getProperty("foo").getString());
+        assertEquals(
+                "Expecting foo=bar",
+                "bar",
+                session.getNode(testNodePath).getProperty("foo").getString());
     }
 
     @Test
     public void folderWithoutDescriptor() throws RepositoryException {
         final String folderPath = CONTENT_ROOT_PATH + "/simple-folder";
         assertTrue("folder node " + folderPath + " exists", session.itemExists(folderPath));
-        assertEquals("folder has node type 'sling:Folder'", "sling:Folder", session.getNode(folderPath).getPrimaryNodeType().getName());
+        assertEquals(
+                "folder has node type 'sling:Folder'",
+                "sling:Folder",
+                session.getNode(folderPath).getPrimaryNodeType().getName());
 
         final String filePath = CONTENT_ROOT_PATH + "/simple-folder/test1.txt";
         assertTrue("file node " + filePath + " exists", session.itemExists(filePath));
-        assertEquals("file has node type 'nt:file'", "nt:file", session.getNode(filePath).getPrimaryNodeType().getName());
+        assertEquals(
+                "file has node type 'nt:file'",
+                "nt:file",
+                session.getNode(filePath).getPrimaryNodeType().getName());
     }
 
     @Test
     public void folderWithDescriptor() throws RepositoryException {
         final String folderPath = CONTENT_ROOT_PATH + "/folder-with-descriptor";
         assertTrue("folder node " + folderPath + " exists", session.itemExists(folderPath));
-        assertEquals("folder has node type 'sling:OrderedFolder'", "sling:OrderedFolder", session.getNode(folderPath).getPrimaryNodeType().getName());
+        assertEquals(
+                "folder has node type 'sling:OrderedFolder'",
+                "sling:OrderedFolder",
+                session.getNode(folderPath).getPrimaryNodeType().getName());
 
         final String filePath = CONTENT_ROOT_PATH + "/folder-with-descriptor/test2.txt";
         assertTrue("file node " + filePath + " exists", session.itemExists(filePath));
-        assertEquals("file has node type 'nt:file'", "nt:file", session.getNode(filePath).getPrimaryNodeType().getName());
+        assertEquals(
+                "file has node type 'nt:file'",
+                "nt:file",
+                session.getNode(filePath).getPrimaryNodeType().getName());
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java b/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java
index 353060e..40d3467 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/ContentloaderTestSupport.java
@@ -18,20 +18,10 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.apache.felix.hc.api.FormattingResultLog.msHumanReadable;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar;
-import static org.apache.sling.testing.paxexam.SlingOptions.slingResourcePresence;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.CoreOptions.composite;
-import static org.ops4j.pax.exam.CoreOptions.junitBundles;
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
-import static org.ops4j.pax.exam.CoreOptions.streamBundle;
-import static org.ops4j.pax.exam.CoreOptions.when;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
-import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
+import javax.inject.Inject;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.SimpleCredentials;
 
 import java.io.BufferedWriter;
 import java.io.IOException;
@@ -43,11 +33,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
-import javax.inject.Inject;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.jcr.SimpleCredentials;
-
+import com.google.common.collect.Multimap;
 import org.apache.felix.hc.api.Result;
 import org.apache.felix.hc.api.ResultLog;
 import org.apache.felix.hc.api.execution.HealthCheckExecutionResult;
@@ -72,7 +58,20 @@ import org.osgi.framework.Constants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.collect.Multimap;
+import static org.apache.felix.hc.api.FormattingResultLog.msHumanReadable;
+import static org.apache.sling.testing.paxexam.SlingOptions.slingQuickstartOakTar;
+import static org.apache.sling.testing.paxexam.SlingOptions.slingResourcePresence;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.streamBundle;
+import static org.ops4j.pax.exam.CoreOptions.when;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
+import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
 
 public abstract class ContentloaderTestSupport extends TestSupport {
 
@@ -99,8 +98,7 @@ public abstract class ContentloaderTestSupport extends TestSupport {
 
     private final Logger logger = LoggerFactory.getLogger(ContentloaderTestSupport.class);
 
-    ContentloaderTestSupport() {
-    }
+    ContentloaderTestSupport() {}
 
     @Inject
     @Filter(value = "(path=" + CONTENT_ROOT_PATH + ")")
@@ -108,7 +106,7 @@ public abstract class ContentloaderTestSupport extends TestSupport {
 
     @Inject
     private HealthCheckExecutor hcExecutor;
-    
+
     public ModifiableCompositeOption baseConfiguration() {
         final String vmOpt = System.getProperty("pax.vm.options");
         VMOption vmOption = null;
@@ -116,45 +114,53 @@ public abstract class ContentloaderTestSupport extends TestSupport {
             vmOption = new VMOption(vmOpt);
         }
 
-        final Option contentloader = mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.jcr.contentloader").version(SlingOptions.versionResolver.getVersion("org.apache.sling", "org.apache.sling.jcr.contentloader"));
+        final Option contentloader = mavenBundle()
+                .groupId("org.apache.sling")
+                .artifactId("org.apache.sling.jcr.contentloader")
+                .version(SlingOptions.versionResolver.getVersion(
+                        "org.apache.sling", "org.apache.sling.jcr.contentloader"));
         return composite(
-            super.baseConfiguration(),
-            when(vmOption != null).useOptions(vmOption),
-            mavenBundle().groupId("org.glassfish").artifactId("jakarta.json").version("2.0.1"),
-            quickstart(),
-            // SLING-9735 - add server user for the o.a.s.jcr.contentloader bundle
-            factoryConfiguration("org.apache.sling.jcr.repoinit.RepositoryInitializer")
-                .put("scripts", new String[] {
-                        "create service user sling-jcr-content-loader\n" +
-                        "\n" +
-                        "set ACL for sling-jcr-content-loader\n" +
-                        "    allow   jcr:all    on /\n" +
-                        "end"})
-                .asOption(),
-            factoryConfiguration("org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended")
-                .put("user.mapping", new String[]{"org.apache.sling.jcr.contentloader=sling-jcr-content-loader"})
-                .asOption(),
-            // Sling JCR ContentLoader
-            testBundle("bundle.filename"),
-            factoryConfiguration("org.apache.sling.resource.presence.internal.ResourcePresenter")
-                .put("path", CONTENT_ROOT_PATH)
-                .asOption(),
-            // testing - add a user to use to login and verify the content loading has happened
-            factoryConfiguration("org.apache.sling.jcr.repoinit.RepositoryInitializer")
-                .put("scripts", new String[] {
-                        "create user " + CONTENT_LOADER_VERIFY_USER + " with password " + new String(CONTENT_LOADER_VERIFY_PWD) +"\n" +
-                        "\n" +
-                        "set ACL for content-loader-user\n" +
-                        "    allow   jcr:read              on /\n" +
-                        "    allow   jcr:readAccessControl on /\n" +
-                        "end"})
-                .asOption(),
-            slingResourcePresence(),
-            junitBundles(),
-            awaitility()
-        ).remove(
-            contentloader
-        );
+                        super.baseConfiguration(),
+                        when(vmOption != null).useOptions(vmOption),
+                        mavenBundle()
+                                .groupId("org.glassfish")
+                                .artifactId("jakarta.json")
+                                .version("2.0.1"),
+                        quickstart(),
+                        // SLING-9735 - add server user for the o.a.s.jcr.contentloader bundle
+                        factoryConfiguration("org.apache.sling.jcr.repoinit.RepositoryInitializer")
+                                .put("scripts", new String[] {
+                                    "create service user sling-jcr-content-loader\n" + "\n"
+                                            + "set ACL for sling-jcr-content-loader\n"
+                                            + "    allow   jcr:all    on /\n"
+                                            + "end"
+                                })
+                                .asOption(),
+                        factoryConfiguration("org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended")
+                                .put(
+                                        "user.mapping",
+                                        new String[] {"org.apache.sling.jcr.contentloader=sling-jcr-content-loader"})
+                                .asOption(),
+                        // Sling JCR ContentLoader
+                        testBundle("bundle.filename"),
+                        factoryConfiguration("org.apache.sling.resource.presence.internal.ResourcePresenter")
+                                .put("path", CONTENT_ROOT_PATH)
+                                .asOption(),
+                        // testing - add a user to use to login and verify the content loading has happened
+                        factoryConfiguration("org.apache.sling.jcr.repoinit.RepositoryInitializer")
+                                .put("scripts", new String[] {
+                                    "create user " + CONTENT_LOADER_VERIFY_USER + " with password "
+                                            + new String(CONTENT_LOADER_VERIFY_PWD) + "\n" + "\n"
+                                            + "set ACL for content-loader-user\n"
+                                            + "    allow   jcr:read              on /\n"
+                                            + "    allow   jcr:readAccessControl on /\n"
+                                            + "end"
+                                })
+                                .asOption(),
+                        slingResourcePresence(),
+                        junitBundles(),
+                        awaitility())
+                .remove(contentloader);
     }
 
     protected ModifiableCompositeOption quickstart() {
@@ -172,11 +178,9 @@ public abstract class ContentloaderTestSupport extends TestSupport {
     public static ModifiableCompositeOption awaitility() {
         return composite(
                 mavenBundle().groupId("org.awaitility").artifactId("awaitility").versionAsInProject(),
-                mavenBundle().groupId("org.hamcrest").artifactId("hamcrest").version(SlingOptions.versionResolver)
-        );
+                mavenBundle().groupId("org.hamcrest").artifactId("hamcrest").version(SlingOptions.versionResolver));
     }
 
-
     @Before
     public void setup() throws Exception {
         session = repository.login(new SimpleCredentials(CONTENT_LOADER_VERIFY_USER, CONTENT_LOADER_VERIFY_PWD));
@@ -196,44 +200,49 @@ public abstract class ContentloaderTestSupport extends TestSupport {
     }
     /**
      * Wait for the bundle content loading to be completed
-     * 
+     *
      * @param timeoutMsec the max time to wait for the content to be loaded
      * @param nextIterationDelay the sleep time between the check attempts
      */
     protected void waitForContentLoaded(long timeoutMsec, long nextIterationDelay) throws Exception {
         Awaitility.await("waitForContentLoaded")
-            .atMost(Duration.ofMillis(timeoutMsec))
-            .pollInterval(Duration.ofMillis(nextIterationDelay))
-            .ignoreExceptions()
-            .until(() -> {
-                logger.info("Performing content-loaded health check");
-                HealthCheckSelector hcs = HealthCheckSelector.tags(TAG_TESTING_CONTENT_LOADING);
-                List<HealthCheckExecutionResult> results = hcExecutor.execute(hcs);
-                logger.info("content-loaded health check got {} results", results.size());
-                assertFalse(results.isEmpty());
-                for (final HealthCheckExecutionResult exR : results) {
-                    final Result r = exR.getHealthCheckResult();
-                    logger.info("content-loaded health check: {}", toHealthCheckResultInfo(exR, false));
-                    assertTrue(r.isOk());
-                }
-                return true;
-            });
+                .atMost(Duration.ofMillis(timeoutMsec))
+                .pollInterval(Duration.ofMillis(nextIterationDelay))
+                .ignoreExceptions()
+                .until(() -> {
+                    logger.info("Performing content-loaded health check");
+                    HealthCheckSelector hcs = HealthCheckSelector.tags(TAG_TESTING_CONTENT_LOADING);
+                    List<HealthCheckExecutionResult> results = hcExecutor.execute(hcs);
+                    logger.info("content-loaded health check got {} results", results.size());
+                    assertFalse(results.isEmpty());
+                    for (final HealthCheckExecutionResult exR : results) {
+                        final Result r = exR.getHealthCheckResult();
+                        logger.info("content-loaded health check: {}", toHealthCheckResultInfo(exR, false));
+                        assertTrue(r.isOk());
+                    }
+                    return true;
+                });
     }
 
     /**
      * Produce a human readable report of the health check results that is suitable for
      * debugging or writing to a log
      */
-    protected String toHealthCheckResultInfo(final HealthCheckExecutionResult exResult, final boolean debug)  throws IOException {
+    protected String toHealthCheckResultInfo(final HealthCheckExecutionResult exResult, final boolean debug)
+            throws IOException {
         String value = null;
-        try (StringWriter resultWriter = new StringWriter(); BufferedWriter writer = new BufferedWriter(resultWriter)) {
+        try (StringWriter resultWriter = new StringWriter();
+                BufferedWriter writer = new BufferedWriter(resultWriter)) {
             final Result result = exResult.getHealthCheckResult();
 
-            writer.append('"').append(exResult.getHealthCheckMetadata().getTitle()).append('"');
+            writer.append('"')
+                    .append(exResult.getHealthCheckMetadata().getTitle())
+                    .append('"');
             writer.append(" result is: ").append(result.getStatus().toString());
             writer.newLine();
-            writer.append("   Finished: ").append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exResult.getFinishedAt()) + " after "
-                    + msHumanReadable(exResult.getElapsedTimeInMs()));
+            writer.append("   Finished: ")
+                    .append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exResult.getFinishedAt()) + " after "
+                            + msHumanReadable(exResult.getElapsedTimeInMs()));
 
             for (final ResultLog.Entry e : result) {
                 if (!debug && e.isDebug()) {
@@ -254,7 +263,7 @@ public abstract class ContentloaderTestSupport extends TestSupport {
         }
         return value;
     }
-    
+
     /**
      * Add content to our test bundle
      */
@@ -268,16 +277,15 @@ public abstract class ContentloaderTestSupport extends TestSupport {
         }
     }
 
-    protected Option buildInitialContentBundle(final String header, final Multimap<String, String> content) throws IOException {
+    protected Option buildInitialContentBundle(final String header, final Multimap<String, String> content)
+            throws IOException {
         final TinyBundle bundle = TinyBundles.bundle();
         bundle.set(Constants.BUNDLE_SYMBOLICNAME, BUNDLE_SYMBOLICNAME);
         bundle.set(SLING_INITIAL_CONTENT_HEADER, header);
         for (final Map.Entry<String, String> entry : content.entries()) {
             addContent(bundle, entry.getKey(), entry.getValue());
         }
-        return streamBundle(
-            bundle.build(withBnd())
-        ).start();
+        return streamBundle(bundle.build(withBnd())).start();
     }
 
     protected Bundle findBundle(final String symbolicName) {
@@ -289,10 +297,10 @@ public abstract class ContentloaderTestSupport extends TestSupport {
         return null;
     }
 
-    protected void assertProperty(final Session session, final String path, final String expected) throws RepositoryException {
+    protected void assertProperty(final Session session, final String path, final String expected)
+            throws RepositoryException {
         assertTrue("Expecting property " + path, session.itemExists(path));
         final String actual = session.getProperty(path).getString();
         assertEquals("Expecting correct value at " + path, expected, actual);
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/I18nInitialContentIT.java b/src/test/java/org/apache/sling/jcr/contentloader/it/I18nInitialContentIT.java
index 9eafd13..93dd0d5 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/I18nInitialContentIT.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/I18nInitialContentIT.java
@@ -18,19 +18,14 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
-
-import java.io.IOException;
-
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.NodeType;
 
+import java.io.IOException;
+
+import com.google.common.collect.ImmutableListMultimap;
+import com.google.common.collect.Multimap;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -41,8 +36,12 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.Multimap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
 /**
  * Basic test of a bundle that provides I18N initial content
@@ -55,19 +54,14 @@ public class I18nInitialContentIT extends ContentloaderTestSupport {
     public Option[] configuration() throws IOException {
         final String header = DEFAULT_PATH_IN_BUNDLE + ";ignoreImportProviders:=json;path:=" + CONTENT_ROOT_PATH;
         final Multimap<String, String> content = ImmutableListMultimap.of(
-            DEFAULT_PATH_IN_BUNDLE, "i18n/en.json",
-            DEFAULT_PATH_IN_BUNDLE, "i18n/en.json.xml"
-        );
+                DEFAULT_PATH_IN_BUNDLE, "i18n/en.json",
+                DEFAULT_PATH_IN_BUNDLE, "i18n/en.json.xml");
         final Option bundle = buildInitialContentBundle(header, content);
         // configure the health check component
         Option hcConfig = factoryConfiguration("org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck")
-            .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
-            .asOption();
-        return options(
-            baseConfiguration(),
-            hcConfig,
-            bundle
-        );
+                .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
+                .asOption();
+        return options(baseConfiguration(), hcConfig, bundle);
     }
 
     /* (non-Javadoc)
@@ -77,10 +71,10 @@ public class I18nInitialContentIT extends ContentloaderTestSupport {
     @Override
     public void setup() throws Exception {
         super.setup();
-        
+
         waitForContentLoaded();
     }
-    
+
     @Test
     public void bundleStarted() {
         final Bundle b = findBundle(BUNDLE_SYMBOLICNAME);
@@ -93,7 +87,10 @@ public class I18nInitialContentIT extends ContentloaderTestSupport {
         final String filePath = CONTENT_ROOT_PATH + "/i18n/en.json";
         assertTrue("file node " + filePath + " exists", session.itemExists(filePath));
         Node node = session.getNode(filePath);
-        assertEquals("file has node type 'nt:file'", "nt:file", node.getPrimaryNodeType().getName());
+        assertEquals(
+                "file has node type 'nt:file'",
+                "nt:file",
+                node.getPrimaryNodeType().getName());
 
         boolean mixLanguageFound = false;
         for (NodeType mixin : node.getMixinNodeTypes()) {
@@ -102,10 +99,10 @@ public class I18nInitialContentIT extends ContentloaderTestSupport {
             }
         }
         assertTrue("file has mixin 'mix:language'", mixLanguageFound);
-        assertEquals("file has property 'en'", "en", node.getProperty("jcr:language").getString());
+        assertEquals(
+                "file has property 'en'", "en", node.getProperty("jcr:language").getString());
 
         final String descriptorPath = CONTENT_ROOT_PATH + "/i18n/en.json.xml";
         assertFalse("descriptor " + descriptorPath + " does not exists", session.itemExists(descriptorPath));
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/OrderedInitialContentIT.java b/src/test/java/org/apache/sling/jcr/contentloader/it/OrderedInitialContentIT.java
index 1cfd596..ca137b0 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/OrderedInitialContentIT.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/OrderedInitialContentIT.java
@@ -18,14 +18,12 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
+import javax.jcr.RepositoryException;
 
 import java.io.IOException;
 
-import javax.jcr.RepositoryException;
-
+import com.google.common.collect.ImmutableListMultimap;
+import com.google.common.collect.Multimap;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -36,8 +34,9 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.Multimap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
 /**
  * Test the SLING-5682 ordered content loading
@@ -49,19 +48,14 @@ public class OrderedInitialContentIT extends ContentloaderTestSupport {
     @Configuration
     public Option[] configuration() throws IOException {
         final String header = DEFAULT_PATH_IN_BUNDLE + ";path:=" + CONTENT_ROOT_PATH;
-        final Multimap<String, String> content = ImmutableListMultimap.of(
-            DEFAULT_PATH_IN_BUNDLE, "ordered-content.ordered-json"
-        );
+        final Multimap<String, String> content =
+                ImmutableListMultimap.of(DEFAULT_PATH_IN_BUNDLE, "ordered-content.ordered-json");
         final Option bundle = buildInitialContentBundle(header, content);
         // configure the health check component
         Option hcConfig = factoryConfiguration("org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck")
-            .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
-            .asOption();
-        return new Option[]{
-            baseConfiguration(),
-            hcConfig,
-            bundle
-        };
+                .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
+                .asOption();
+        return new Option[] {baseConfiguration(), hcConfig, bundle};
     }
 
     /* (non-Javadoc)
@@ -71,10 +65,10 @@ public class OrderedInitialContentIT extends ContentloaderTestSupport {
     @Override
     public void setup() throws Exception {
         super.setup();
-        
+
         waitForContentLoaded();
     }
-    
+
     @Test
     public void bundleStarted() {
         final Bundle b = findBundle(BUNDLE_SYMBOLICNAME);
@@ -87,5 +81,4 @@ public class OrderedInitialContentIT extends ContentloaderTestSupport {
         assertProperty(session, CONTENT_ROOT_PATH + "/ordered-content/first/title", "This comes first");
         assertProperty(session, CONTENT_ROOT_PATH + "/ordered-content/second/title", "This comes second");
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/SLING11713InitialContentIT.java b/src/test/java/org/apache/sling/jcr/contentloader/it/SLING11713InitialContentIT.java
index 119085c..fafdd6a 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/SLING11713InitialContentIT.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/SLING11713InitialContentIT.java
@@ -18,12 +18,13 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.CoreOptions.composite;
-import static org.ops4j.pax.exam.CoreOptions.vmOption;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlList;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.Privilege;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -36,14 +37,8 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlList;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.Privilege;
-
+import com.google.common.collect.ImmutableListMultimap;
+import com.google.common.collect.Multimap;
 import org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry;
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
@@ -61,8 +56,12 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.Multimap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.vmOption;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
 /**
  * SLING-11713 test ACL json input structure to be less ambiguous for restrictions
@@ -74,20 +73,13 @@ public class SLING11713InitialContentIT extends ContentloaderTestSupport {
     @Configuration
     public Option[] configuration() throws IOException {
         final String header = DEFAULT_PATH_IN_BUNDLE + ";path:=" + CONTENT_ROOT_PATH;
-        final Multimap<String, String> content = ImmutableListMultimap.of(
-            DEFAULT_PATH_IN_BUNDLE, "SLING-11713.json"
-        );
+        final Multimap<String, String> content = ImmutableListMultimap.of(DEFAULT_PATH_IN_BUNDLE, "SLING-11713.json");
         final Option bundle = buildInitialContentBundle(header, content);
         // configure the health check component
         Option hcConfig = factoryConfiguration("org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck")
-            .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
-            .asOption();
-        return new Option[]{
-            baseConfiguration(),
-            hcConfig,
-            bundle,
-            optionalRemoteDebug()
-        };
+                .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
+                .asOption();
+        return new Option[] {baseConfiguration(), hcConfig, bundle, optionalRemoteDebug()};
     }
 
     /**
@@ -110,10 +102,10 @@ public class SLING11713InitialContentIT extends ContentloaderTestSupport {
     @Override
     public void setup() throws Exception {
         super.setup();
-        
+
         waitForContentLoaded();
     }
-    
+
     @Test
     public void bundleStarted() {
         final Bundle b = findBundle(BUNDLE_SYMBOLICNAME);
@@ -125,7 +117,10 @@ public class SLING11713InitialContentIT extends ContentloaderTestSupport {
     public void initialContentInstalled() throws RepositoryException {
         final String folderPath = CONTENT_ROOT_PATH + "/SLING-11713";
         assertTrue("Expecting initial content to be installed", session.itemExists(folderPath));
-        assertEquals("folder has node type 'sling:Folder'", "sling:Folder", session.getNode(folderPath).getPrimaryNodeType().getName());
+        assertEquals(
+                "folder has node type 'sling:Folder'",
+                "sling:Folder",
+                session.getNode(folderPath).getPrimaryNodeType().getName());
     }
 
     @Test
@@ -157,85 +152,110 @@ public class SLING11713InitialContentIT extends ContentloaderTestSupport {
         List<AccessControlEntry> allEntries = new ArrayList<AccessControlEntry>();
         for (AccessControlPolicy accessControlPolicy : policies) {
             if (accessControlPolicy instanceof AccessControlList) {
-                AccessControlEntry[] accessControlEntries = ((AccessControlList) accessControlPolicy).getAccessControlEntries();
+                AccessControlEntry[] accessControlEntries =
+                        ((AccessControlList) accessControlPolicy).getAccessControlEntries();
                 allEntries.addAll(Arrays.asList(accessControlEntries));
             }
         }
         assertEquals(9, allEntries.size());
         Map<String, List<AccessControlEntry>> aceMap = new HashMap<>();
         for (AccessControlEntry accessControlEntry : allEntries) {
-            List<AccessControlEntry> aceList = aceMap.computeIfAbsent(accessControlEntry.getPrincipal().getName(), name -> new ArrayList<>());
+            List<AccessControlEntry> aceList =
+                    aceMap.computeIfAbsent(accessControlEntry.getPrincipal().getName(), name -> new ArrayList<>());
             aceList.add(accessControlEntry);
         }
 
-        //check ACE for sling11713_user
+        // check ACE for sling11713_user
         List<AccessControlEntry> aceList = aceMap.get("sling11713_user");
         assertNotNull(aceList);
         assertEquals(3, aceList.size());
-        assertAce(aceList.get(0), "sling11713_user",
+        assertAce(
+                aceList.get(0),
+                "sling11713_user",
                 false, // isAllow
                 new String[] {"jcr:write"}, // PrivilegeNames
                 new String[] {"rep:glob"}, // RestrictionNames
-                new String[][] {new String[]{"glob1deny"}}); // RestrictionValues
-        assertAce(aceList.get(1), "sling11713_user",
+                new String[][] {new String[] {"glob1deny"}}); // RestrictionValues
+        assertAce(
+                aceList.get(1),
+                "sling11713_user",
                 true, // isAllow
                 new String[] {"jcr:read"}, // PrivilegeNames
                 new String[] {}, // RestrictionNames
                 new String[][] {}); // RestrictionValues
-        assertAce(aceList.get(2), "sling11713_user",
+        assertAce(
+                aceList.get(2),
+                "sling11713_user",
                 true, // isAllow
                 new String[] {"jcr:write"}, // PrivilegeNames
                 new String[] {"rep:glob"}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
 
-        //check ACE for sling11713_group
+        // check ACE for sling11713_group
         aceList = aceMap.get("sling11713_group");
         assertNotNull(aceList);
         assertEquals(1, aceList.size());
-        assertAce(aceList.get(0), "sling11713_group",
+        assertAce(
+                aceList.get(0),
+                "sling11713_group",
                 true, // isAllow
                 new String[] {"jcr:modifyAccessControl"}, // PrivilegeNames
                 new String[] {"rep:itemNames"}, // RestrictionNames
-                new String[][] {new String[]{"name1", "name2"}}); // RestrictionValues
+                new String[][] {new String[] {"name1", "name2"}}); // RestrictionValues
 
-        //check ACE for everyone
+        // check ACE for everyone
         aceList = aceMap.get("everyone");
         assertNotNull(aceList);
         assertEquals(3, aceList.size());
-        assertAce(aceList.get(0), "everyone",
+        assertAce(
+                aceList.get(0),
+                "everyone",
                 false, // isAllow
                 new String[] {"jcr:write"}, // PrivilegeNames
                 new String[] {"rep:glob"}, // RestrictionNames
-                new String[][] {new String[]{"glob1deny"}}); // RestrictionValues
-        assertAce(aceList.get(1), "everyone",
+                new String[][] {new String[] {"glob1deny"}}); // RestrictionValues
+        assertAce(
+                aceList.get(1),
+                "everyone",
                 true, // isAllow
                 new String[] {"jcr:read"}, // PrivilegeNames
                 new String[] {}, // RestrictionNames
                 new String[][] {}); // RestrictionValues
-        assertAce(aceList.get(2), "everyone",
+        assertAce(
+                aceList.get(2),
+                "everyone",
                 true, // isAllow
                 new String[] {"jcr:write"}, // PrivilegeNames
                 new String[] {"rep:glob"}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
 
         aceList = aceMap.get("sling11713_user2");
         assertNotNull(aceList);
         assertEquals(2, aceList.size());
-        assertAce(aceList.get(0), "sling11713_user2",
+        assertAce(
+                aceList.get(0),
+                "sling11713_user2",
                 false, // isAllow
                 new String[] {"jcr:read"}, // PrivilegeNames
                 new String[] {"rep:itemNames"}, // RestrictionNames
-                new String[][] {new String[]{"name1"}}); // RestrictionValues
-        assertAce(aceList.get(1), "sling11713_user2",
+                new String[][] {new String[] {"name1"}}); // RestrictionValues
+        assertAce(
+                aceList.get(1),
+                "sling11713_user2",
                 true, // isAllow
                 new String[] {"jcr:read"}, // PrivilegeNames
                 new String[] {"rep:glob"}, // RestrictionNames
-                new String[][] {new String[]{"glob1allow"}}); // RestrictionValues
+                new String[][] {new String[] {"glob1allow"}}); // RestrictionValues
     }
 
-    public static void assertAce(AccessControlEntry ace, String expectedPrincipal,
-            boolean isAllow, String[] expectedPrivilegeNames,
-            String[] expectedRestrictionNames, String[][] expectedRestrictionValues) throws RepositoryException {
+    public static void assertAce(
+            AccessControlEntry ace,
+            String expectedPrincipal,
+            boolean isAllow,
+            String[] expectedPrivilegeNames,
+            String[] expectedRestrictionNames,
+            String[][] expectedRestrictionValues)
+            throws RepositoryException {
 
         assertNotNull("Expected ACE for test principal", expectedPrincipal);
         assertEquals(expectedPrincipal, ace.getPrincipal().getName());
@@ -243,9 +263,8 @@ public class SLING11713InitialContentIT extends ContentloaderTestSupport {
         Privilege[] storedPrivileges = ace.getPrivileges();
         assertNotNull(storedPrivileges);
         assertEquals(expectedPrivilegeNames.length, storedPrivileges.length);
-        Set<String> privilegeNamesSet = Stream.of(storedPrivileges)
-            .map(item -> item.getName())
-            .collect(Collectors.toSet());
+        Set<String> privilegeNamesSet =
+                Stream.of(storedPrivileges).map(item -> item.getName()).collect(Collectors.toSet());
         for (String pn : expectedPrivilegeNames) {
             assertTrue("Expecting privilege: " + pn, privilegeNamesSet.contains(pn));
         }
@@ -254,12 +273,11 @@ public class SLING11713InitialContentIT extends ContentloaderTestSupport {
         JackrabbitAccessControlEntry jace = (JackrabbitAccessControlEntry) ace;
         assertEquals(isAllow, jace.isAllow());
 
-        //check restrictions
+        // check restrictions
         String[] storedRestrictionNames = jace.getRestrictionNames();
         assertNotNull(storedRestrictionNames);
         assertEquals(expectedRestrictionNames.length, storedRestrictionNames.length);
-        Set<String> restrictionNamesSet = Stream.of(storedRestrictionNames)
-            .collect(Collectors.toSet());
+        Set<String> restrictionNamesSet = Stream.of(storedRestrictionNames).collect(Collectors.toSet());
         for (String rn : expectedRestrictionNames) {
             assertTrue("Expecting restriction: " + rn, restrictionNamesSet.contains(rn));
         }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/SLING7268InitialContentIT.java b/src/test/java/org/apache/sling/jcr/contentloader/it/SLING7268InitialContentIT.java
index 83861b4..b9242c9 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/SLING7268InitialContentIT.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/SLING7268InitialContentIT.java
@@ -18,10 +18,12 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
+import javax.jcr.RepositoryException;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlList;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.Privilege;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -33,13 +35,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlList;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.Privilege;
-
+import com.google.common.collect.ImmutableListMultimap;
+import com.google.common.collect.Multimap;
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
 import org.apache.jackrabbit.api.security.user.UserManager;
@@ -54,13 +51,15 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.Multimap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
 /**
  * test of a bundle that provides initial content that creates a user/group and defines an ace
  * for those principals within the same transaction
-
+ *
  */
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
@@ -69,19 +68,13 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
     @Configuration
     public Option[] configuration() throws IOException {
         final String header = DEFAULT_PATH_IN_BUNDLE + ";path:=" + CONTENT_ROOT_PATH;
-        final Multimap<String, String> content = ImmutableListMultimap.of(
-            DEFAULT_PATH_IN_BUNDLE, "SLING-7268.json"
-        );
+        final Multimap<String, String> content = ImmutableListMultimap.of(DEFAULT_PATH_IN_BUNDLE, "SLING-7268.json");
         final Option bundle = buildInitialContentBundle(header, content);
         // configure the health check component
         Option hcConfig = factoryConfiguration("org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck")
-            .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
-            .asOption();
-        return new Option[]{
-            baseConfiguration(),
-            hcConfig,
-            bundle
-        };
+                .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
+                .asOption();
+        return new Option[] {baseConfiguration(), hcConfig, bundle};
     }
 
     /* (non-Javadoc)
@@ -91,10 +84,10 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
     @Override
     public void setup() throws Exception {
         super.setup();
-        
+
         waitForContentLoaded();
     }
-    
+
     @Test
     public void bundleStarted() {
         final Bundle b = findBundle(BUNDLE_SYMBOLICNAME);
@@ -106,7 +99,10 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
     public void initialContentInstalled() throws RepositoryException {
         final String folderPath = CONTENT_ROOT_PATH + "/SLING-7268";
         assertTrue("Expecting initial content to be installed", session.itemExists(folderPath));
-        assertEquals("folder has node type 'sling:Folder'", "sling:Folder", session.getNode(folderPath).getPrimaryNodeType().getName());
+        assertEquals(
+                "folder has node type 'sling:Folder'",
+                "sling:Folder",
+                session.getNode(folderPath).getPrimaryNodeType().getName());
     }
 
     @Test
@@ -138,7 +134,8 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
         List<AccessControlEntry> allEntries = new ArrayList<AccessControlEntry>();
         for (AccessControlPolicy accessControlPolicy : policies) {
             if (accessControlPolicy instanceof AccessControlList) {
-                AccessControlEntry[] accessControlEntries = ((AccessControlList) accessControlPolicy).getAccessControlEntries();
+                AccessControlEntry[] accessControlEntries =
+                        ((AccessControlList) accessControlPolicy).getAccessControlEntries();
                 allEntries.addAll(Arrays.asList(accessControlEntries));
             }
         }
@@ -148,7 +145,7 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
             aceMap.put(accessControlEntry.getPrincipal().getName(), accessControlEntry);
         }
 
-        //check ACE for sling7268_user
+        // check ACE for sling7268_user
         AccessControlEntry testUserAce = aceMap.get("sling7268_user");
         assertNotNull("Expected ACE for test user", testUserAce);
         assertEquals("sling7268_user", testUserAce.getPrincipal().getName());
@@ -162,7 +159,7 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
         assertTrue("Expecting granted read privilege", privilegeNames.contains("jcr:read"));
         assertTrue("Expecting granted write privilege", privilegeNames.contains("jcr:write"));
 
-        //check ACE for sling7268_group
+        // check ACE for sling7268_group
         AccessControlEntry testGroupAce = aceMap.get("sling7268_group");
         assertNotNull("Expected ACE for test user", testGroupAce);
         assertEquals("sling7268_group", testGroupAce.getPrincipal().getName());
@@ -173,9 +170,10 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
         for (Privilege privilege : privileges) {
             privilegeNames.add(privilege.getName());
         }
-        assertTrue("Expecting granted modifyAccessControl privilege", privilegeNames.contains("jcr:modifyAccessControl"));
+        assertTrue(
+                "Expecting granted modifyAccessControl privilege", privilegeNames.contains("jcr:modifyAccessControl"));
 
-        //check ACE for everyone group
+        // check ACE for everyone group
         AccessControlEntry everyoneAce = aceMap.get("everyone");
         assertNotNull("Expected ACE for everyone", everyoneAce);
         assertEquals("everyone", everyoneAce.getPrincipal().getName());
@@ -185,5 +183,4 @@ public class SLING7268InitialContentIT extends ContentloaderTestSupport {
 
         assertEquals("Expecting granted read privilege", "jcr:read", privileges[0].getName());
     }
-
 }
diff --git a/src/test/java/org/apache/sling/jcr/contentloader/it/SLING8118InitialContentIT.java b/src/test/java/org/apache/sling/jcr/contentloader/it/SLING8118InitialContentIT.java
index 4060b5b..46b9725 100644
--- a/src/test/java/org/apache/sling/jcr/contentloader/it/SLING8118InitialContentIT.java
+++ b/src/test/java/org/apache/sling/jcr/contentloader/it/SLING8118InitialContentIT.java
@@ -18,10 +18,13 @@
  */
 package org.apache.sling.jcr.contentloader.it;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.security.AccessControlEntry;
+import javax.jcr.security.AccessControlList;
+import javax.jcr.security.AccessControlManager;
+import javax.jcr.security.AccessControlPolicy;
+import javax.jcr.security.Privilege;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -33,14 +36,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.jcr.RepositoryException;
-import javax.jcr.Value;
-import javax.jcr.security.AccessControlEntry;
-import javax.jcr.security.AccessControlList;
-import javax.jcr.security.AccessControlManager;
-import javax.jcr.security.AccessControlPolicy;
-import javax.jcr.security.Privilege;
-
+import com.google.common.collect.ImmutableListMultimap;
+import com.google.common.collect.Multimap;
 import org.apache.jackrabbit.api.security.JackrabbitAccessControlEntry;
 import org.apache.jackrabbit.api.security.user.Authorizable;
 import org.apache.jackrabbit.api.security.user.Group;
@@ -56,8 +53,10 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-import com.google.common.collect.ImmutableListMultimap;
-import com.google.common.collect.Multimap;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
 /**
  * test of a bundle that provides initial content that defines an ace with restrictions
@@ -69,19 +68,13 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
     @Configuration
     public Option[] configuration() throws IOException {
         final String header = DEFAULT_PATH_IN_BUNDLE + ";path:=" + CONTENT_ROOT_PATH;
-        final Multimap<String, String> content = ImmutableListMultimap.of(
-            DEFAULT_PATH_IN_BUNDLE, "SLING-8118.json"
-        );
+        final Multimap<String, String> content = ImmutableListMultimap.of(DEFAULT_PATH_IN_BUNDLE, "SLING-8118.json");
         final Option bundle = buildInitialContentBundle(header, content);
         // configure the health check component
         Option hcConfig = factoryConfiguration("org.apache.sling.jcr.contentloader.hc.BundleContentLoadedCheck")
-            .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
-            .asOption();
-        return new Option[]{
-            baseConfiguration(),
-            hcConfig,
-            bundle
-        };
+                .put("hc.tags", new String[] {TAG_TESTING_CONTENT_LOADING})
+                .asOption();
+        return new Option[] {baseConfiguration(), hcConfig, bundle};
     }
 
     /* (non-Javadoc)
@@ -91,10 +84,10 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
     @Override
     public void setup() throws Exception {
         super.setup();
-        
+
         waitForContentLoaded();
     }
-    
+
     @Test
     public void bundleStarted() {
         final Bundle b = findBundle(BUNDLE_SYMBOLICNAME);
@@ -106,7 +99,10 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
     public void initialContentInstalled() throws RepositoryException {
         final String folderPath = CONTENT_ROOT_PATH + "/SLING-8118";
         assertTrue("Expecting initial content to be installed", session.itemExists(folderPath));
-        assertEquals("folder has node type 'sling:Folder'", "sling:Folder", session.getNode(folderPath).getPrimaryNodeType().getName());
+        assertEquals(
+                "folder has node type 'sling:Folder'",
+                "sling:Folder",
+                session.getNode(folderPath).getPrimaryNodeType().getName());
     }
 
     @Test
@@ -138,7 +134,8 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
         List<AccessControlEntry> allEntries = new ArrayList<AccessControlEntry>();
         for (AccessControlPolicy accessControlPolicy : policies) {
             if (accessControlPolicy instanceof AccessControlList) {
-                AccessControlEntry[] accessControlEntries = ((AccessControlList) accessControlPolicy).getAccessControlEntries();
+                AccessControlEntry[] accessControlEntries =
+                        ((AccessControlList) accessControlPolicy).getAccessControlEntries();
                 allEntries.addAll(Arrays.asList(accessControlEntries));
             }
         }
@@ -148,7 +145,7 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
             aceMap.put(accessControlEntry.getPrincipal().getName(), accessControlEntry);
         }
 
-        //check ACE for sling8118_user
+        // check ACE for sling8118_user
         AccessControlEntry testUserAce = aceMap.get("sling8118_user");
         assertNotNull("Expected ACE for test user", testUserAce);
         assertEquals("sling8118_user", testUserAce.getPrincipal().getName());
@@ -162,7 +159,7 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
         assertTrue("Expecting granted read privilege", privilegeNames.contains("jcr:read"));
         assertTrue("Expecting granted write privilege", privilegeNames.contains("jcr:write"));
 
-        //check restrictions
+        // check restrictions
         assertTrue(testUserAce instanceof JackrabbitAccessControlEntry);
         JackrabbitAccessControlEntry testUserJAce = (JackrabbitAccessControlEntry) testUserAce;
         String[] testUserRestrictionNames = testUserJAce.getRestrictionNames();
@@ -173,7 +170,7 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
         assertNotNull(globRestriction);
         assertEquals("glob1", globRestriction.getString());
 
-        //check ACE for sling8118_group
+        // check ACE for sling8118_group
         AccessControlEntry testGroupAce = aceMap.get("sling8118_group");
         assertNotNull("Expected ACE for test user", testGroupAce);
         assertEquals("sling8118_group", testGroupAce.getPrincipal().getName());
@@ -184,9 +181,10 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
         for (Privilege privilege : privileges) {
             privilegeNames.add(privilege.getName());
         }
-        assertTrue("Expecting granted modifyAccessControl privilege", privilegeNames.contains("jcr:modifyAccessControl"));
+        assertTrue(
+                "Expecting granted modifyAccessControl privilege", privilegeNames.contains("jcr:modifyAccessControl"));
 
-        //check restrictions
+        // check restrictions
         assertTrue(testGroupAce instanceof JackrabbitAccessControlEntry);
         JackrabbitAccessControlEntry testGroupJAce = (JackrabbitAccessControlEntry) testGroupAce;
         String[] testGroupRestrictionNames = testGroupJAce.getRestrictionNames();
@@ -199,8 +197,7 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
         assertEquals("name1", restrictions[0].getString());
         assertEquals("name2", restrictions[1].getString());
 
-
-        //check ACE for everyone group
+        // check ACE for everyone group
         AccessControlEntry everyoneAce = aceMap.get("everyone");
         assertNotNull("Expected ACE for everyone", everyoneAce);
         assertEquals("everyone", everyoneAce.getPrincipal().getName());
@@ -210,12 +207,11 @@ public class SLING8118InitialContentIT extends ContentloaderTestSupport {
 
         assertEquals("Expecting granted read privilege", "jcr:read", privileges[0].getName());
 
-        //check restrictions
+        // check restrictions
         assertTrue(everyoneAce instanceof JackrabbitAccessControlEntry);
         JackrabbitAccessControlEntry everyoneJAce = (JackrabbitAccessControlEntry) everyoneAce;
         String[] everyoneRestrictionNames = everyoneJAce.getRestrictionNames();
         assertNotNull(everyoneRestrictionNames);
         assertEquals(0, everyoneRestrictionNames.length);
     }
-
 }


(sling-org-apache-sling-jcr-contentloader) 01/03: SLING-12587 Update to parent 62

Posted by ss...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 22ba35d961a2b18b47b9d111bc51f69799cec822
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Dec 19 14:13:55 2024 +0100

    SLING-12587 Update to parent 62
---
 .sling-module.json |  5 +++++
 pom.xml            | 13 ++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.sling-module.json b/.sling-module.json
new file mode 100644
index 0000000..cfad4d2
--- /dev/null
+++ b/.sling-module.json
@@ -0,0 +1,5 @@
+{
+  "jenkins": {
+    "jdks": [17, 21]
+  }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 4d10613..967df8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling-bundle-parent</artifactId>
-        <version>49</version>
+        <version>62</version>
         <relativePath />
     </parent>
 
@@ -132,6 +132,11 @@
             <artifactId>org.osgi.annotation.bundle</artifactId>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.framework</artifactId>
+            <scope>provided</scope>
+        </dependency>
         <!-- JetBrains annotations for null-analysis (SLING-7798) -->
         <dependency>
             <groupId>org.jetbrains</groupId>
@@ -259,6 +264,12 @@
             <artifactId>org.apache.felix.healthcheck.api</artifactId>
             <version>2.0.4</version>
             <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>