[
https://issues.jboss.org/browse/JBVFS-182?page=com.atlassian.jira.plugin....
]
Chris Sams updated JBVFS-182:
-----------------------------
Description:
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}
was:
Accessing a jar:file: URL causes an NPE if -Djboss.vfs.forceCanonical=true
Add the following to SymlinkTestCase.java:
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);
}
}
Results in:
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)
Steps to Reproduce:
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}
was:
Add the following to SymlinkTestCase.java:
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);
}
}
Assignee: John Bailey (was: Ales Justin)
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: John Bailey
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:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira