]> source.dussan.org Git - poi.git/commitdiff
Remove some remnants of NFileSystem
authorDominik Stadler <centic@apache.org>
Sat, 23 Feb 2019 07:52:06 +0000 (07:52 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 23 Feb 2019 07:52:06 +0000 (07:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1854191 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/POIDocument.java
src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java
src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java

index 69033a3f5fd11c0cc91d5f43f5ce99d156b13078..78015b4a954a03348cf50c5981b3d831dbd51d82 100644 (file)
@@ -418,8 +418,8 @@ public abstract class POIDocument implements Closeable {
     @Override
     public void close() throws IOException {
         if (directory != null) {
-            if (directory.getNFileSystem() != null) {
-                directory.getNFileSystem().close();
+            if (directory.getFileSystem() != null) {
+                directory.getFileSystem().close();
                 clearDirectory();
             }
         }
index 84b2de913d3853b64e16e650585a74430b4085e3..47c7e7ff4b27ef1b6dd7518952f345b25a7de12c 100644 (file)
@@ -119,17 +119,6 @@ public class DirectoryNode
         return _nfilesystem;
     }
 
-
-    /**
-     * If this is NPOIFS based, return the NPOIFSFileSystem
-     *  that this belong to, otherwise Null if OPOIFS based
-     * @return the filesystem that this belongs to
-     */
-    public POIFSFileSystem getNFileSystem()
-    {
-        return _nfilesystem;
-    }
-
     /**
      * open a document in the directory's entry's list of entries
      *
index a89adad48992765d18af39386519ff5e315ca668..e808d357ce9b25e0a5fa1edb63b08b899e7d7462 100644 (file)
@@ -87,7 +87,7 @@ public final class DocumentInputStream extends InputStream implements LittleEndi
         DocumentProperty property = (DocumentProperty)doc.getProperty();
         _document = new POIFSDocument(
                 property, 
-                ((DirectoryNode)doc.getParent()).getNFileSystem()
+                ((DirectoryNode)doc.getParent()).getFileSystem()
         );
         _data = _document.getBlockIterator();
     }
index b96110fc461b590902849747464d0d8b01d0f029..a47b2d8300358d42695f53c726865794c8781766 100644 (file)
@@ -54,7 +54,7 @@ public final class POIFSDocument implements POIFSViewable, Iterable<ByteBuffer>
     */
    public POIFSDocument(DocumentNode document) {
        this((DocumentProperty)document.getProperty(), 
-            ((DirectoryNode)document.getParent()).getNFileSystem());
+            ((DirectoryNode)document.getParent()).getFileSystem());
    }
    
    /**
index c10a4c1c6e37da6e2ea510f8edbb67f8678b7619..6f1470568536efbfebe6c1e8fa872dcd7094adb5 100644 (file)
@@ -442,7 +442,6 @@ public final class TestDocumentInputStream {
 
         try (POIFSFileSystem npoifs = new POIFSFileSystem(sample)) {
             // Ensure we have what we expect on the root
-            assertEquals(npoifs, npoifs.getRoot().getNFileSystem());
             assertEquals(npoifs, npoifs.getRoot().getFileSystem());
 
             // Check inside
index 3ce269c04ed5d6ebc331c69fef3933379188c928..dc220d7f4048104bf360c063c0341e9c42411b77 100644 (file)
@@ -140,9 +140,9 @@ public final class TestFileSystemBugs {
         // Copy over
         EntryUtils.copyNodes(root, dest);
 
-        // Re-load, always as NPOIFS
+        // Re-load
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        root.getNFileSystem().writeFilesystem(baos);
+        root.getFileSystem().writeFilesystem(baos);
 
         POIFSFileSystem read = new POIFSFileSystem(
                 new ByteArrayInputStream(baos.toByteArray()));