commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Skinfill (JIRA)" <>
Subject [jira] [Commented] (VFS-427) NPE on HttpFileObject.getContent().getContentInfo()
Date Wed, 11 Jul 2012 21:29:35 GMT


Craig Skinfill commented on VFS-427:

Here's what I'm seeing

FileSystemManager fsManager = VFS.getManager();
FileObject fo = fsManager.resolveFile("");
FileContent content = fo.getContent();
	at org.apache.commons.vfs2.provider.http.HttpFileContentInfoFactory.create(
	at org.apache.commons.vfs2.provider.DefaultFileContent.getContentInfo(

However, it appears to work fine if I put
FileObject fo = fsManager.resolveFile(uri2use);
FileContent content = fo.getContent();

or if I do
FileObject fo = fsManager.resolveFile(uri2use);
FileContent content = fo.getContent();

In those two cases it works properly (no NPE).  Looks like the headMethod in the HttpFileObject
needs to be initialized earlier?
> NPE on HttpFileObject.getContent().getContentInfo()
> ---------------------------------------------------
>                 Key: VFS-427
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>            Reporter: Craig Skinfill
> It looks like the "head" httpMethod is getting set to null, but is used in the getContentInfo()

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message