diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 3817:804088c2e23a

Prevent follow-up errors. flys-artifacts/tags/pre2.7-2012-03-16@4162 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 19 Mar 2012 14:14:53 +0000
parents a71fc8f2030c
children 3aec5a42696a
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Mon Mar 19 14:13:15 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java	Mon Mar 19 14:14:53 2012 +0000
@@ -479,7 +479,7 @@
      * ArtifactAndFacets on the fly (with the same ordering as the passed
      * ThemeList).
      * @param themeList ThemeList to create a ArtifactAndFacetList along.
-     * @param contect   The "Blackboard".
+     * @param context   The "Blackboard".
      */
     protected List<ArtifactAndFacet> doBlackboardPass(
         ThemeList themeList, CallContext context
@@ -490,6 +490,7 @@
 
         try {
             // Collect all ArtifactAndFacets for blackboard pass.
+            int pivot = 0;
             for (int i = 0; i < size; i++) {
                 ManagedFacet theme = themeList.get(i);
                 if (theme == null) {
@@ -511,7 +512,8 @@
                 artifactAndFacet.register(context);
 
                 // Add to themes.
-                dataProviders.add(i, artifactAndFacet);
+                dataProviders.add(pivot, artifactAndFacet);
+                pivot += 1;
             }
         }
         catch (ArtifactDatabaseException ade) {

http://dive4elements.wald.intevation.org