You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2014/05/02 13:52:20 UTC

svn commit: r1591877 - /sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java

Author: olli
Date: Fri May  2 11:52:20 2014
New Revision: 1591877

URL: http://svn.apache.org/r1591877
Log:
SLING-3114 return from system view import also when resulting node is null

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

Modified: sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java?rev=1591877&r1=1591876&r2=1591877&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java (original)
+++ sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/DefaultContentImporter.java Fri May  2 11:52:20 2014
@@ -78,13 +78,13 @@ public class DefaultContentImporter exte
         // special treatment for system view imports
         if (name.endsWith(EXT_JCR_XML)) {
             boolean replace = (importOptions == null) ? false : importOptions.isOverwrite();
-            Node node = importSystemView(parent, name, contentStream, replace);
+            final Node node = importSystemView(parent, name, contentStream, replace);
             if (node != null) {
                 if (importListener != null) {
                     importListener.onCreate(node.getPath());
                 }
-                return;
             }
+            return;
         }
 
         DefaultContentCreator contentCreator = new DefaultContentCreator(this);
@@ -172,11 +172,11 @@ public class DefaultContentImporter exte
             return (parent.hasNode(nodeName)) ? parent.getNode(nodeName) : null;
         } catch (InvalidSerializedDataException isde) {
             // the xml might not be System or Document View export, fall back to old-style XML reading
-            log.info("importSystemView: XML does not seem to be system view export, trying old style; cause: {}", isde.toString());
+            log.info("importSystemView: XML does not seem to be system view export; cause: {}", isde.toString());
             return null;
         } catch (RepositoryException re) {
             // any other repository related issue...
-            log.info("importSystemView: Repository issue loading XML, trying old style; cause: {}", re.toString());
+            log.info("importSystemView: Repository issue loading XML; cause: {}", re.toString());
             return null;
         } finally {
             if (ins != null) {