[jcifs] jcifs bug
mballen at erols.com
Sat Mar 23 07:56:55 EST 2002
On Fri, 22 Mar 2002 13:23:47 -0700
"Bernie Wieser" <bernie.wieser at calgary.qcdata.com> wrote:
> The test I sent has nothing to do with hanging; just illustrates the cached
> file issue.
> The code change also has nothing to do with the hang; and it doesn't come
> back (though I am not sure
> what line of code.)
> url = new URL("smb://sb041/tstsamba/test.txt");
> UrlConnector uc = new UrlConnector(url, "tstsamba", "tstsamba");
> InputStream is = uc.getInputStream();
> Properties p = new Properties();
> p.load( new BufferedInputStream( is ) );
> sb041 is my local machine. it hangs when I go to read from the stream (via
> note our UrlConnector eventually sets the properties required by jcifs to do
> its auth
> before calling the urls getInputStream.
> i will eventually figure it out. all I know now is that .60 worked for us,
> and .61
Well you'd better figure it out because 0.6.0 has a serious bug in it:
Thu Feb 21 03:02:23 EST 2002
If a file is retrived using the SmbFileInputStream class, the file's size
is precisely a multiple of 4096 and the byte b and int len parameters
used in a read() operation are both larger than 4096, the read( byte
b ) and read( byte b, int off, int len ) methods will return -1. The <=
condition in the middle of read( b, off, len ) has been changed to just <.
But maybe 0.6.1's SmbFileInputStream still has an issue. Note the file
size of files it chokes on if possible.
PS: Please reply-all to get the jcifs mailing list.
May The Source be with you.
More information about the jcifs