tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup ClassLoaderFactory.java
Date Tue, 07 Sep 2004 23:13:01 GMT
remm        2004/09/07 16:13:01

  Modified:    catalina/src/share/org/apache/catalina/startup
                        ClassLoaderFactory.java
  Log:
  - Fix URL generation.
  - This was causing an issue with expanded classes repositories, unfortunately, and only
on Windows (Unix would be ok).
  
  Revision  Changes    Path
  1.10      +7 -7      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java
  
  Index: ClassLoaderFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ClassLoaderFactory.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ClassLoaderFactory.java	5 Aug 2004 10:54:43 -0000	1.9
  +++ ClassLoaderFactory.java	7 Sep 2004 23:13:01 -0000	1.10
  @@ -114,11 +114,10 @@
                   File file = unpacked[i];
                   if (!file.exists() || !file.canRead())
                       continue;
  +                file = new File(file.getCanonicalPath() + File.separator);
  +                URL url = file.toURL();
                   if (log.isDebugEnabled())
  -                    log.debug("  Including directory or JAR " 
  -                        + file.getAbsolutePath());
  -                URL url = new URL("file", null,
  -                                  file.getCanonicalPath() + File.separator);
  +                    log.debug("  Including directory " + url);
                   list.add(url);
               }
           }
  @@ -138,8 +137,7 @@
                       File file = new File(directory, filenames[j]);
                       if (log.isDebugEnabled())
                           log.debug("  Including jar file " + file.getAbsolutePath());
  -                    URL url = new URL("file", null,
  -                                      file.getCanonicalPath());
  +                    URL url = file.toURL();
                       list.add(url);
                   }
               }
  @@ -148,6 +146,8 @@
           // Add URLs
           if (urls != null) {
               for (int i = 0; i < urls.length; i++) {
  +                if (log.isDebugEnabled())
  +                    log.debug("  Including URL " + urls[i]);
                   list.add(urls[i]);
               }
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message