geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r962861 - /geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java
Date Sat, 10 Jul 2010 15:36:59 GMT
Author: xuhaihong
Date: Sat Jul 10 15:36:59 2010
New Revision: 962861

URL: http://svn.apache.org/viewvc?rev=962861&view=rev
Log:
Fix the ArrayIndexOoutOfBoundsException in relative web fragment sorting

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java?rev=962861&r1=962860&r2=962861&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java
Sat Jul 10 15:36:59 2010
@@ -452,7 +452,9 @@ public class MergeHelper {
             // b. A -> B -> A
             // c. A -> B ->  C -> A
             for (WebFragmentOrderEntry webFragmentOrderEntry : webFragmentOrderEntryList)
{
-                detectCircusAfterDependency(webFragmentOrderEntry, webFragmentOrderEntry,
webFragmentOrderEntryMap, new HashSet<String>());
+                Set<String> allAfterEntryNames = new HashSet<String>();
+                detectCircusAfterDependency(webFragmentOrderEntry, webFragmentOrderEntry,
webFragmentOrderEntryMap, allAfterEntryNames);
+                webFragmentOrderEntry.afterEntryNames.addAll(allAfterEntryNames);
             }
             //Step 4: Sort the webFragment depending on the after configurations
             //TODO The Sort algorithm might need to improve.
@@ -565,7 +567,7 @@ public class MergeHelper {
         }
         if (iShouldAfterIndex < iShouldBeforeIndex) {
             WebFragmentOrderEntry webFragmentOrderEntry = webFragmentOrderEntries.remove(iShouldAfterIndex);
-            webFragmentOrderEntries.add(iShouldBeforeIndex + 1, webFragmentOrderEntry);
+            webFragmentOrderEntries.add(iShouldBeforeIndex, webFragmentOrderEntry);
         }
     }
 



Mime
View raw message