-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
2.2.0.GA, 2.2.0.SP1
Accessing a jar:file: URL causes an NPE if -Djboss.vfs.forceCanonical=true
Add the following to SymlinkTestCase.java:
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)
- blocks
-
JBPAPP-9469 JBoss VFS-182:Access of URLs with jar:file: scheme causes an NPE when setting -Djboss.vfs.forceCanonical=true
- Closed