[PATCH 1 of 4] Datacage recommendations: Sort outs to to generate consistent cache keys

Wald Commits scm-commit at wald.intevation.org
Thu Oct 31 18:34:15 CET 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1383240326 -3600
# Node ID f8e1af4e2f690fdb3a7b80411481dfaca8e4a57f
# Parent  2a2e89c015887679cbace0a94c709dcf7bc4deaa
Datacage recommendations: Sort outs to to generate consistent cache keys.

diff -r 2a2e89c01588 -r f8e1af4e2f69 artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Thu Oct 31 13:11:03 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Thu Oct 31 18:25:26 2013 +0100
@@ -8,6 +8,7 @@
 
 package org.dive4elements.river.artifacts;
 
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -134,8 +135,8 @@
      */
     private static final String [] extractOutputNames(
         D4EArtifact flys,
-        CallContext  context)
-    {
+        CallContext context
+    ) {
         if (flys instanceof ChartArtifact) {
             return new String[0];
         }
@@ -150,6 +151,9 @@
             names[i] = outs.get(i).getName();
         }
 
+        // Sort them to make cache key generation consistent.
+        Arrays.sort(names);
+
         return names;
     }
 


More information about the Dive4elements-commits mailing list