You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2017/10/26 14:43:45 UTC
svn commit: r1813411 -
/commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/FileNameTests.java
Author: ggregory
Date: Thu Oct 26 14:43:45 2017
New Revision: 1813411
URL: http://svn.apache.org/viewvc?rev=1813411&view=rev
Log:
Looking for an NPE...
Modified:
commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/FileNameTests.java
Modified: commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/FileNameTests.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/FileNameTests.java?rev=1813411&r1=1813410&r2=1813411&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/FileNameTests.java (original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/local/test/FileNameTests.java Thu Oct 26 14:43:45 2017
@@ -19,23 +19,28 @@ package org.apache.commons.vfs2.provider
import java.io.File;
import org.apache.commons.vfs2.FileObject;
+import org.apache.commons.vfs2.impl.DefaultFileSystemManager;
import org.apache.commons.vfs2.test.AbstractProviderTestCase;
+import org.junit.Assert;
/**
* Additional naming tests for local file system.
*/
public class FileNameTests extends AbstractProviderTestCase {
+
/**
* Tests resolution of an absolute file name.
*/
public void testAbsoluteFileName() throws Exception {
// Locate file by absolute file name
final String fileName = new File("testdir").getAbsolutePath();
- final FileObject absFile = getManager().resolveFile(fileName);
-
+ DefaultFileSystemManager manager = getManager();
+ final FileObject absFile = manager.resolveFile(fileName);
+ Assert.assertNotNull("Unexpected null manager for test " + this, manager);
+
// Locate file by URI
final String uri = "file://" + fileName.replace(File.separatorChar, '/');
- final FileObject uriFile = getManager().resolveFile(uri);
+ final FileObject uriFile = manager.resolveFile(uri);
assertSame("file object", absFile, uriFile);
}