[jcifs] NPE in SmbFile.listFiles with 1.2.18

Patrick Madden PatrickMadden at clooster.com
Tue Mar 4 15:30:33 GMT 2008


I just upgraded my code to jcifs 1.2.18 from 1.2.17 and was running
through some unit test code and ran into some issues.

For example the SmbFile.listFiles() method throws a NPE when trying to
use the DFS capabilities explained on the jcifs home page

Assume I have a valid NTLMAuthentication instance when I call the
following code:

SmbFile smbHost = new SmbFile("smb://foo.local/", ntlmAuth);

SmbFile[] allShares = smbHost.listFiles();

	at jcifs.smb.SmbShareInfo.hashCode(SmbShareInfo.java:64)
	at java.util.HashMap.getEntry(Unknown Source)
	at java.util.HashMap.containsKey(Unknown Source)
	at jcifs.smb.SmbFile.doShareEnum(SmbFile.java:1697)
	at jcifs.smb.SmbFile.doEnum(SmbFile.java:1652)
	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1631)
	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1564)
	at com.clooster.jcifs.SmbFileTest.testDFS(SmbFileTest.java:75)
	at com.clooster.jcifs.SmbFileTest.main(SmbFileTest.java:159)

The value of netname in the SmbShareInfo is null.

Anyone have any ideas?

Thanks in advance.


More information about the jcifs mailing list