incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1055500 - /sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
Date Wed, 05 Jan 2011 16:05:33 GMT
Author: cziegeler
Date: Wed Jan  5 16:05:33 2011
New Revision: 1055500

URL: http://svn.apache.org/viewvc?rev=1055500&view=rev
Log:
SLING-1918 : Use time based folder structure for jobs without an id

Modified:
    sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java

Modified: sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java?rev=1055500&r1=1055499&r2=1055500&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
(original)
+++ sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/impl/jobs/jcr/PersistenceHandler.java
Wed Jan  5 16:05:33 2011
@@ -416,10 +416,12 @@ public class PersistenceHandler implemen
                 // check hour folder
                 if ( path.endsWith("59") ) {
                     final String hourPath = path.substring(0, path.length() - 3);
-                    final Node hourNode = s.getNode(hourPath);
-                    if ( !hourNode.hasNodes() ) {
-                        hourNode.remove();
-                        s.save();
+                    if ( s.nodeExists(hourPath) ) {
+                        final Node hourNode = s.getNode(hourPath);
+                        if ( !hourNode.hasNodes() ) {
+                            hourNode.remove();
+                            s.save();
+                        }
                     }
                 }
             }



Mime
View raw message