[jcifs] SmbFile.getParent() NullPointerException

Caldarale, Charles R Chuck.Caldarale at unisys.com
Fri Nov 12 16:15:31 MST 2010

> From: jcifs-bounces at lists.samba.org [mailto:jcifs-bounces at lists.samba.org] On Behalf Of David Kaelbling
> Subject: Re: [jcifs] SmbFile.getParent() NullPointerException

> It also shows the getPath() behavior that confused me.

Remember that every valid SMB URL that refers to a file must have at least four slashes: two to separate the protocol from the host, another to separate the host from the share, and one more to separate the share from the file.  When the host, share, and file are all null, you get the seemingly odd result.

It would be useful to get Chris' viewpoint, since he's the author of the SMB URL RFC.

 - Chuck

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

More information about the jCIFS mailing list