incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1143034 - /sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
Date Tue, 05 Jul 2011 12:54:08 GMT
Author: fmeschbe
Date: Tue Jul  5 12:54:07 2011
New Revision: 1143034

URL: http://svn.apache.org/viewvc?rev=1143034&view=rev
Log:
SLING-2123 Use Map<String,...> instead of Map<URL,...>

Modified:
    sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java

Modified: sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java?rev=1143034&r1=1143033&r2=1143034&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
(original)
+++ sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/Loader.java
Tue Jul  5 12:54:07 2011
@@ -355,7 +355,7 @@ public class Loader extends BaseImportLo
         //  init content creator
         contentCreator.init(configuration, this.defaultImportProviders, createdNodes, null);
 
-        final Map<URL, Node> processedEntries = new HashMap<URL, Node>();
+        final Map<String, Node> processedEntries = new HashMap<String, Node>();
 
         @SuppressWarnings("unchecked")
         Enumeration<String> entries = bundle.getEntryPaths(path);
@@ -379,7 +379,7 @@ public class Loader extends BaseImportLo
         // potential parent node import/extension
         URL parentNodeDescriptor = importParentNode(parent.getSession(), bundle, path, parent,
contentCreator);
         if (parentNodeDescriptor != null) {
-            processedEntries.put(parentNodeDescriptor, parent);
+            processedEntries.put(parentNodeDescriptor.toString(), parent);
         }
 
         while (entries.hasMoreElements()) {
@@ -408,7 +408,7 @@ public class Loader extends BaseImportLo
                     if (node == null) {
                         node = createNode(parent, name, nodeDescriptor,
                                           configuration, contentCreator);
-                        processedEntries.put(nodeDescriptor, node);
+                        processedEntries.put(nodeDescriptor.toString(), node);
                     }
                 } else {
                     node = createFolder(parent, name, configuration.isOverwrite());
@@ -439,7 +439,7 @@ public class Loader extends BaseImportLo
      */
     private void handleFile(final String entry,
                             final Bundle bundle,
-                            final Map<URL, Node> processedEntries,
+                            final Map<String, Node> processedEntries,
                             final PathEntry configuration,
                             final Node parent,
                             final List<String> createdNodes,
@@ -469,7 +469,7 @@ public class Loader extends BaseImportLo
             if (foundProvider) {
                 if ((node = createNode(parent, name, file, configuration, contentCreator))
!= null) {
                     log.debug("Created Node as {} {} ",node.getPath(),name);
-                    processedEntries.put(file, node);
+                    processedEntries.put(file.toString(), node);
                 } else {
                     log.warn("No Node created for file {} {} ",file,name);
                 }
@@ -493,7 +493,7 @@ public class Loader extends BaseImportLo
                     contentCreator.setIgnoreOverwriteFlag(true);
                     node = createNode(parent, name, nodeDescriptor,
                                       configuration, contentCreator);
-                    processedEntries.put(nodeDescriptor, node);
+                    processedEntries.put(nodeDescriptor.toString(), node);
                 } finally {
                     contentCreator.setIgnoreOverwriteFlag(false);
                 }



Mime
View raw message