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

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

commit a16d99a84036fc074f6a6146862d9511a8a48905
Author: Oliver Lietz <[email protected]>
AuthorDate: Sun Jan 27 13:27:06 2019 +0100

    SLING-8249 Drop use of timestamp from ScanResult in 
ResourcePersistingScanResultHandler
---
 .../clam/result/internal/ResourcePersistingScanResultHandler.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/clam/result/internal/ResourcePersistingScanResultHandler.java
 
b/src/main/java/org/apache/sling/clam/result/internal/ResourcePersistingScanResultHandler.java
index ad37e00..9ae2943 100644
--- 
a/src/main/java/org/apache/sling/clam/result/internal/ResourcePersistingScanResultHandler.java
+++ 
b/src/main/java/org/apache/sling/clam/result/internal/ResourcePersistingScanResultHandler.java
@@ -139,7 +139,7 @@ public class ResourcePersistingScanResultHandler implements 
JcrPropertyScanResul
             properties.put(JCR_PRIMARYTYPE, NT_UNSTRUCTURED);
             properties.put(JCR_MIXINTYPES, MIX_CREATED);
             properties.put(SLING_RESOURCE_TYPE_PROPERTY, RESULT_RESOURCE_TYPE);
-            final Resource parent = getOrCreateParent(resourceResolver, 
scanResult.getTimestamp());
+            final Resource parent = getOrCreateParent(resourceResolver);
             final String name = ResourceUtil.createUniqueChildName(parent, 
PropertyType.nameFromValue(propertyType));
             final Resource result = resourceResolver.create(parent, name, 
properties);
             resourceResolver.commit();
@@ -153,9 +153,8 @@ public class ResourcePersistingScanResultHandler implements 
JcrPropertyScanResul
         }
     }
 
-    private Resource getOrCreateParent(final ResourceResolver 
resourceResolver, final long timestamp) throws PersistenceException {
-        final Date date = new Date(timestamp);
-        final String path = String.format("%s/%s", 
configuration.result_root_path(), FORMAT.format(date));
+    private Resource getOrCreateParent(final ResourceResolver 
resourceResolver) throws PersistenceException {
+        final String path = String.format("%s/%s", 
configuration.result_root_path(), FORMAT.format(new Date()));
         return ResourceUtil.getOrCreateResource(resourceResolver, path, 
NT_SLING_ORDERED_FOLDER, NT_SLING_ORDERED_FOLDER, true);
     }
 

Reply via email to