SLING-1901 - integration test and bugfix for LaunchpadConfigInstaller

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1052489 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java b/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
index c4ad12e..91fa78b 100644
--- a/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
+++ b/src/main/java/org/apache/sling/launchpad/installer/impl/LaunchpadConfigInstaller.java
@@ -33,8 +33,8 @@
 @Component
 public class LaunchpadConfigInstaller {
 
-    /**
-     * 
+    /** Resources supplied under this path by 
+     *  LaunchpadContentProvider are considered for installation
      */
     private static final String ROOT_CONFIG_PATH = "resources/config";
 
@@ -47,22 +47,19 @@
     private Logger logger = LoggerFactory.getLogger(this.getClass());
 
     protected void activate(ComponentContext componentContext) {
-        logger.info("Activating launchpad config installer.");
-
+        logger.info("Activating launchpad config installer, resources path={}", ROOT_CONFIG_PATH);
         Collection<InstallableResource> installables = new HashSet<InstallableResource>();
 
         Iterator<String> configPaths = resourceProvider.getChildren(ROOT_CONFIG_PATH);
         while (configPaths.hasNext()) {
             String path = configPaths.next();
-
-            logger.info("Installing config launchpad file: {}", path);
-
+            logger.info("Config launchpad file will be installed: {}", path);
             InputStream stream = resourceProvider.getResourceAsStream(path);
-
             installables.add(new InstallableResource(path, stream, null, null, InstallableResource.TYPE_CONFIG, 0));
-
         }
 
-        installer.registerResources("launchpad", (InstallableResource[])installables.toArray());
+        final InstallableResource [] toInstall = installables.toArray(new InstallableResource []{});
+        installer.registerResources("launchpad", (toInstall));
+        logger.info("{} resources registered with OsgiInstaller", toInstall.length);
     }
-}
+}
\ No newline at end of file