You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Brian Olsen <br...@mmmanager.org> on 2002/08/21 13:17:04 UTC

[VFS][PATCH] ClassLoader

I finally finished moving the VFS class loader so that it complies with the new location, test data location and code conventions (removed the m_ prefix :-)

The patch changes the FileObject.getContent implementation so it doesn't fail when called on a folder instead the individual calls in FileContent that are illegal on a folder ( getInputStream, getOutputStream, etc ) fail.

If one of the FileObjects in the class loader's classpath is a file the class loader will try to switch to the "jar" file scheme.

I have also added a unit test that checks the ClassLoader with each provider.

This patch does not support all the features that come with jars, but the ground work is done.
A jar provider is on the way but I have to make the same changes as where made to this patch.


Have fun :-)
- Brian

Re: [VFS][PATCH] ClassLoader

Posted by Adam Murdoch <ad...@apache.org>.
----- Original Message -----
From: "Brian Olsen" <br...@mmmanager.org>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 11:41 PM
Subject: Re: [VFS][PATCH] ClassLoader


>
> ----- Original Message -----
> From: "Adam Murdoch" <ad...@apache.org>
> To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
> Sent: Wednesday, August 21, 2002 3:29 PM
> Subject: Re: [VFS][PATCH] ClassLoader
>
>
> >
> > Hi,
> >
> > Patch applied, thanks.
> >
> > Something I'm thinking of doing, is replace FileObject.getRoot() and
> > FileObject.getParentLayer(), with a single FileObject.getFileSystem()
> > method.  I'm trying to avoid bloating FileObject too much, and given
that
> > these methods return the same thing for every file in a file system, it
> > makes sense to move 'em.  It would also give us a good place to add file
> > system specific extensions.
> Will it return a FileSystem???
> And will you then move FileSystem from vfs.provider to vfs???

Yep to both.

> > With the Jar provider patch, send it in as-is if you like, I can tidy it
up.
> It's ok I'm almost done.
>
>
> - Brian
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [VFS][PATCH] ClassLoader

Posted by Brian Olsen <br...@mmmanager.org>.
----- Original Message ----- 
From: "Adam Murdoch" <ad...@apache.org>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 3:29 PM
Subject: Re: [VFS][PATCH] ClassLoader


> 
> Hi,
> 
> Patch applied, thanks.
> 
> Something I'm thinking of doing, is replace FileObject.getRoot() and
> FileObject.getParentLayer(), with a single FileObject.getFileSystem()
> method.  I'm trying to avoid bloating FileObject too much, and given that
> these methods return the same thing for every file in a file system, it
> makes sense to move 'em.  It would also give us a good place to add file
> system specific extensions.
Will it return a FileSystem???
And will you then move FileSystem from vfs.provider to vfs???

> With the Jar provider patch, send it in as-is if you like, I can tidy it up.
It's ok I'm almost done.
 

- Brian


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [VFS][PATCH] ClassLoader

Posted by Adam Murdoch <ad...@apache.org>.
Hi,

Patch applied, thanks.

Something I'm thinking of doing, is replace FileObject.getRoot() and
FileObject.getParentLayer(), with a single FileObject.getFileSystem()
method.  I'm trying to avoid bloating FileObject too much, and given that
these methods return the same thing for every file in a file system, it
makes sense to move 'em.  It would also give us a good place to add file
system specific extensions.

With the Jar provider patch, send it in as-is if you like, I can tidy it up.


----- Original Message -----
From: Brian Olsen
To: Jakarta Commons Developers List
Sent: Wednesday, August 21, 2002 9:17 PM
Subject: [VFS][PATCH] ClassLoader


I finally finished moving the VFS class loader so that it complies with the
new location, test data location and code conventions (removed the m_ prefix
:-)

The patch changes the FileObject.getContent implementation so it doesn't
fail when called on a folder instead the individual calls in FileContent
that are illegal on a folder ( getInputStream, getOutputStream, etc ) fail.

If one of the FileObjects in the class loader's classpath is a file the
class loader will try to switch to the "jar" file scheme.

I have also added a unit test that checks the ClassLoader with each
provider.

This patch does not support all the features that come with jars, but the
ground work is done.
A jar provider is on the way but I have to make the same changes as where
made to this patch.


Have fun :-)
- Brian



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>