Jcifs bug?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Jcifs bug?

Joe Marshall
I have a java.net.URI from which I'm creating a jcifs.smb.SmbFile

I create a java.net.URL as an intermediate structure:

  URL intermediate = new URL (myURI.getScheme(),
                              myURI.getHost(),
                              myURI.getPath());

In theory, I can create the SmbFile directly from this URL:

  SmbFile mySmbFile = new SmbFile (intermediate, myAuth);

but this causes an error with a bogus port of -1
However, if I create the SmbFile via a string:

  SmbFile mySmbFile = new SmbFile (intermediate.toString(), myAuth);

everything is copacetic.

No need for an immediate fix, just thought you'd like to know.


--
~jrm
Reply | Threaded
Open this post in threaded view
|

Re: Jcifs bug?

Michael B Allen-4
Ok, I'll add this to The List.

Thanks,
Mike

On Thu, 29 Dec 2005 09:32:54 -0800
Joe Marshall <[hidden email]> wrote:

> I have a java.net.URI from which I'm creating a jcifs.smb.SmbFile
>
> I create a java.net.URL as an intermediate structure:
>
>   URL intermediate = new URL (myURI.getScheme(),
>                               myURI.getHost(),
>                               myURI.getPath());
>
> In theory, I can create the SmbFile directly from this URL:
>
>   SmbFile mySmbFile = new SmbFile (intermediate, myAuth);
>
> but this causes an error with a bogus port of -1
> However, if I create the SmbFile via a string:
>
>   SmbFile mySmbFile = new SmbFile (intermediate.toString(), myAuth);
>
> everything is copacetic.
>
> No need for an immediate fix, just thought you'd like to know.
>
>
> --
> ~jrm
>