avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder SimpleLoaderResolver.java
Date Fri, 01 Nov 2002 23:21:24 GMT
donaldp     2002/11/01 15:21:22

  Modified:    loader/src/java/org/apache/excalibur/loader/builder
                        SimpleLoaderResolver.java
  Log:
  Make sure locations that indicate directorys have a "/" at the end or else they will be
droppped by URLClassLoader
  
  Revision  Changes    Path
  1.8       +8 -2      jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder/SimpleLoaderResolver.java
  
  Index: SimpleLoaderResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder/SimpleLoaderResolver.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SimpleLoaderResolver.java	31 Oct 2002 21:36:57 -0000	1.7
  +++ SimpleLoaderResolver.java	1 Nov 2002 23:21:22 -0000	1.8
  @@ -102,7 +102,13 @@
       public URL resolveURL( final String location )
           throws Exception
       {
  -        return getFileFor( location ).toURL();
  +        final File file = getFileFor( location );
  +        String url = file.toURL().toString();
  +        if( file.isDirectory() )
  +        {
  +            url += "/";
  +        }
  +        return new URL( url );
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message