[jcifs] Re: SMB URL encoding/decoding

Michael B Allen mballen at erols.com
Tue Feb 26 07:08:04 EST 2002


On Mon, 25 Feb 2002 11:06:54 -0800
rjw <rob at wygand.com> wrote:

> > 	There's definitely some improvement that can be done here. I don't know if
> > 	you've been following the other posts in this thread but the conclusion was
> > 	that the current SmbURL handling is just wrong. The correct method is
> > 	actually much easier. As a result I think the code will be more streamlined. It
> > 	should probably manipulate char[] rather than using charAt and substring
> > 	which will prevent a few unnecessary String objects from being created for
> > 	each URL parse.
> 
> I've been following this thread with a great amount of interest. I think 
> it's very important that we nail down the proper behaviour. And while I 
> agree that optimizing that routine and making it spec compliant are both 
> great, the best optimzation you can ever make to a function is to skip 
> calling it. ;)

I believe we have nailed it down. The correct way to do it is described in
Chris' draft but it's easier than the BNF grammer looks. The current code
just looks hard because I made a dumb-dumb. If you familiarize yourself
with the issue I think you could find ways to reduce the String concerns
in the process. Otherwise I think the code has proven to be pretty
sturdy so I'm going to let it age a little. If you (or anyone else)
wants to take a crack at the new SMB URL paraser by all means feel free
to do so and let us know how it's going. I'll be lurking.

Mike

-- 
May The Source be with you.




More information about the jcifs mailing list