[jcifs] Bug in jCIFS 0.8.0 SmbFile.exists() method

Michael B Allen mba2000 at ioplex.com
Thu Feb 26 02:42:34 GMT 2004


Michael Kerley said:
> I found a bug in the exists() method in jCIFS 0.8.0.  If I create an
> SmbFile representing a workgroup and call exists() on it, it always
> returns false (which is wrong).

Confirmed. If exists() is the first thing called on a workgroup the type
== TYPE_WORKGROUP will not be type because type will not be set due to
attribute caching. In exists() the type conditional should probably be
getType() == TYPE_WORKGROUP. In 0.7 I have if( true || type ==. I probably
ran into the problem in the middle of some busy hacking and fudged it to
always do the workgroupOrServer lookup.

I have some other fixes that need to go in. I'll roll a 0.8.1 release real
soon.

Mike



More information about the jcifs mailing list