Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 64720 invoked by uid 500); 12 Feb 2000 19:51:21 -0000 Delivered-To: apmail-jakarta-tomcat-cvs@jakarta.apache.org Received: (qmail 64711 invoked from network); 12 Feb 2000 19:51:20 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by locus.apache.org with SMTP; 12 Feb 2000 19:51:20 -0000 Received: (qmail 21851 invoked by uid 2016); 12 Feb 2000 19:51:17 -0000 Delivered-To: apcore-jakarta-tomcat-cvs@apache.org Received: (qmail 21719 invoked from network); 12 Feb 2000 19:51:06 -0000 Received: from locus.apache.org (63.211.145.10) by taz.hyperreal.org with SMTP; 12 Feb 2000 19:51:05 -0000 Received: (qmail 64690 invoked by uid 1064); 12 Feb 2000 19:50:41 -0000 Date: 12 Feb 2000 19:50:41 -0000 Message-ID: <20000212195041.64689.qmail@locus.apache.org> From: rubys@locus.apache.org To: jakarta-tomcat-cvs@apache.org Subject: cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/loader AdaptiveServletLoader.java ServletClassLoaderImpl.java rubys 00/02/12 11:50:41 Modified: src/share/org/apache/tomcat/loader AdaptiveServletLoader.java ServletClassLoaderImpl.java Log: More fun and games with JDK 1.1. SimpleFileFilter was dying in getParent due to wrong way slashes. Instead of proliferating FileUtil.patch calls, I decided to fix these at the source (the classpath vector itself). This has the added advantage of fixing up the file once on creation instead of every time on reference. Revision Changes Path 1.3 +6 -6 jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveServletLoader.java Index: AdaptiveServletLoader.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveServletLoader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AdaptiveServletLoader.java 2000/02/10 18:55:55 1.2 +++ AdaptiveServletLoader.java 2000/02/12 19:50:40 1.3 @@ -151,11 +151,7 @@ for(Enumeration e = classP.elements() ; e.hasMoreElements(); ) { File f = (File) e.nextElement(); if (cpath.length()>0) cpath += separator; - try { - cpath += FileUtil.patch(f.getCanonicalPath()); - } catch( IOException ex) { - ex.printStackTrace(); - } + cpath += f; } return cpath; @@ -168,7 +164,11 @@ */ public void addRepository( File f ) { // System.out.println("Adding " + f.getName() ); - classP.addElement( f ); + try { + classP.addElement(new File(FileUtil.patch(f.getCanonicalPath()))); + } catch( IOException ex) { + ex.printStackTrace(); + } } /** Add a new remote repository. Not all class loader will 1.7 +3 -6 jakarta-tomcat/src/share/org/apache/tomcat/loader/ServletClassLoaderImpl.java Index: ServletClassLoaderImpl.java =================================================================== RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/loader/ServletClassLoaderImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ServletClassLoaderImpl.java 2000/02/10 18:55:55 1.6 +++ ServletClassLoaderImpl.java 2000/02/12 19:50:40 1.7 @@ -137,11 +137,7 @@ for(Enumeration e = classP.elements() ; e.hasMoreElements(); ) { File f = (File) e.nextElement(); if (cpath.length()>0) cpath += separator; - try { - cpath += FileUtil.patch(f.getCanonicalPath()); - } catch( IOException ex) { - ex.printStackTrace(); - } + cpath += f; } return cpath; @@ -153,8 +149,9 @@ * that may require a reload. */ public void addRepository( File f ) { - classP.addElement( f ); try { + classP.addElement(new File(FileUtil.patch(f.getCanonicalPath()))); + String path=f.getCanonicalPath(); // NetworkClassLoader will use the last char to // decide if it's a directory or a jar.