ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaco...@apache.org
Subject svn commit: r1055412 - /ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/container/ComponentContainer.java
Date Wed, 05 Jan 2011 11:06:40 GMT
Author: jacopoc
Date: Wed Jan  5 11:06:40 2011
New Revision: 1055412

URL: http://svn.apache.org/viewvc?rev=1055412&view=rev
Log:
Backported rev. 1055411: hot-deploy component are now always loaded in alphanumeric order;
before this change they were loaded randomly (in a platform dependedent way).

Modified:
    ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/container/ComponentContainer.java

Modified: ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/container/ComponentContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/container/ComponentContainer.java?rev=1055412&r1=1055411&r2=1055412&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/container/ComponentContainer.java
(original)
+++ ofbiz/branches/release10.04/framework/base/src/org/ofbiz/base/container/ComponentContainer.java
Wed Jan  5 11:06:40 2011
@@ -22,6 +22,7 @@ import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Arrays;
 import java.util.List;
 
 import org.ofbiz.base.component.AlreadyLoadedException;
@@ -195,7 +196,9 @@ public class ComponentContainer implemen
                     Debug.logError(e, "Unable to load components from URL: " + configUrl.toExternalForm(),
module);
                 }
             } else {
-                for (String sub: parentPath.list()) {
+                String[] fileNames = parentPath.list();
+                Arrays.sort(fileNames);
+                for (String sub: fileNames) {
                     try {
                         File componentPath = FileUtil.getFile(parentPath.getCanonicalPath()
+ "/" + sub);
                         if (componentPath.isDirectory() && !sub.equals("CVS") &&
!sub.equals(".svn")) {



Mime
View raw message