geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1337006 - /geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationUpdateHelper.java
Date Fri, 11 May 2012 02:18:28 GMT
Author: gawor
Date: Fri May 11 02:18:28 2012
New Revision: 1337006

URL: http://svn.apache.org/viewvc?rev=1337006&view=rev
Log:
handle slashes at beginning or end of class path entry

Modified:
    geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationUpdateHelper.java

Modified: geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationUpdateHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationUpdateHelper.java?rev=1337006&r1=1337005&r2=1337006&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationUpdateHelper.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/aries/geronimo-aries/src/main/java/org/apache/geronimo/aries/ApplicationUpdateHelper.java
Fri May 11 02:18:28 2012
@@ -242,15 +242,22 @@ public class ApplicationUpdateHelper {
         for (int i = 0; i < classPathElements.size(); i++) {
             String classPathName = classPathElements.get(i).getName();
             if (classPathName.equals(".") || classPathName.equals("/")) {
-                classPathName = "";
-            } else if (classPathName.endsWith("/")) {
-                classPathName = classPathName.substring(0, classPathName.length() - 1);
-            }
-            /*
-             * Could check & ignore jar class path entries but treat them as directory
-             * entries for now. 
-             */
-            classPath[i] = classPathName;
+                classPath[i] = "";
+            } else {
+                int start = 0;
+                if (classPathName.startsWith("/")) {
+                    start++;
+                }
+                int end = classPathName.length();
+                if (classPathName.endsWith("/")) {
+                    end--;
+                }
+                /*
+                 * Could check & ignore jar class path entries but treat them as directory
+                 * entries for now. 
+                 */
+                classPath[i] = classPathName.substring(start, end);                
+            }
         }
         return classPath;
     }



Mime
View raw message