[jcifs] SmbFile.getParent() NullPointerException
David Kaelbling
dkaelbling at blackducksoftware.com
Fri Nov 12 16:08:49 MST 2010
Hi Mike,
Here's the getParent() fragment inline. It also shows the getPath()
behavior that confused me.
import jcifs.smb.SmbFile;
public class ParentTest {
public static void main( String[] argv ) throws Exception {
SmbFile file = new SmbFile( "smb://" );
System.out.print("getParent(" + file.getPath() + ") => ");
System.out.println(file.getParent());
}
}
On Fri, 2010-11-12 at 17:54 -0500, Michael B Allen wrote:
> Actually can you just inline the fragment?
>
> On Fri, Nov 12, 2010 at 5:52 PM, David Kaelbling
> <dkaelbling at blackducksoftware.com> wrote:
> > Hi,
> >
> > Sample code I can do! Please see the attachment. Running it I see:
> >
> > twinkie 9> java -cp ../jcifs-1.3.15.jar:. ParentTest
> > getParent(smb:////) => Exception in thread "main"
> > java.lang.NullPointerException
> > at jcifs.smb.SmbFile.getParent(SmbFile.java:1090)
> > at ParentTest.main(ParentTest.java:7)
> >
> > - David
--
David Kaelbling
Senior Software Engineer
Black Duck Software, Inc.
dkaelbling at blackducksoftware.com
T +1.781.810.2041
F +1.781.891.5145
http://www.blackducksoftware.com
More information about the jCIFS
mailing list