[jboss-jira] [JBoss JIRA] (JBVFS-182) Access of URLs with jar:file: scheme causes an NPE when setting -Djboss.vfs.forceCanonical=true

Brad Maxwell (JIRA) jira-events at lists.jboss.org
Thu Jun 6 19:21:55 EDT 2013


    [ https://issues.jboss.org/browse/JBVFS-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779970#comment-12779970 ] 

Brad Maxwell commented on JBVFS-182:
------------------------------------

Has the change for this been pulled in so that we can resolve this in the next release?
                
> Access of URLs with jar:file: scheme causes an NPE when setting -Djboss.vfs.forceCanonical=true
> -----------------------------------------------------------------------------------------------
>
>                 Key: JBVFS-182
>                 URL: https://issues.jboss.org/browse/JBVFS-182
>             Project: JBoss VFS
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Release
>    Affects Versions:  2.2.0.GA, 2.2.0.SP1
>            Reporter: Chris Sams
>            Assignee: Ales Justin
>
> Accessing a jar:file: URL causes an NPE if -Djboss.vfs.forceCanonical=true
> Add the following to SymlinkTestCase.java:
> {code:title=SymlinkTestCase.java|borderStyle=solid}
>    public void testJarFileScheme() throws Exception
>    {   
>       URL url = getResource("/vfs/test/level1.zip");
>       try 
>       {   
>         VFS vfs = VFS.getVFS(new URL("jar:file:" + url.getPath() + "!/" + "level2.zip/level3.zip"));
>       }   
>       catch(NullPointerException npe)
>       {   
>         failure("NPE thrown because jar:file: not handled by canonicalization code.", npe);
>       }   
>    }
> {code}
> Results in:
> {noformat}
> testJarFileScheme(org.jboss.test.virtual.test.SymlinkTestCase)  Time elapsed: 0.015 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: NPE thrown because jar:file: not handled by canonicalization code.
> ...
> <snip>
> ...
> Caused by: java.lang.NullPointerException
>   at java.io.File.<init>(File.java:222)
>   at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.canonicalize(DefaultVFSRegistry.java:124)
>   at org.jboss.virtual.plugins.registry.DefaultVFSRegistry.getContext(DefaultVFSRegistry.java:144)
>   at org.jboss.virtual.VFS.getVFS(VFS.java:203)
>   at org.jboss.virtual.VFS.getVFS(VFS.java:184)
>   at org.jboss.virtual.VFS.getVFS(VFS.java:287)
>   at org.jboss.test.virtual.test.SymlinkTestCase.testJarFileScheme(SymlinkTestCase.java:174)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list