aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2019-02-23 07:52:06 +0000
committerDominik Stadler <centic@apache.org>2019-02-23 07:52:06 +0000
commit98b620889b52ebc71f06b154c5d599c004ff26e8 (patch)
tree13b38034451654075d841ed4eeba88f0e443d7c9 /src
parent8c6e95f597620e5c117fa39cbd564d98f28a382d (diff)
downloadpoi-98b620889b52ebc71f06b154c5d599c004ff26e8.tar.gz
poi-98b620889b52ebc71f06b154c5d599c004ff26e8.zip
Remove some remnants of NFileSystem
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1854191 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/poi/POIDocument.java4
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java11
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java2
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java2
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java4
6 files changed, 6 insertions, 18 deletions
diff --git a/src/java/org/apache/poi/POIDocument.java b/src/java/org/apache/poi/POIDocument.java
index 69033a3f5f..78015b4a95 100644
--- a/src/java/org/apache/poi/POIDocument.java
+++ b/src/java/org/apache/poi/POIDocument.java
@@ -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();
}
}
diff --git a/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java b/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
index 84b2de913d..47c7e7ff4b 100644
--- a/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
+++ b/src/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
@@ -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
*
diff --git a/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java b/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java
index a89adad489..e808d357ce 100644
--- a/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java
+++ b/src/java/org/apache/poi/poifs/filesystem/DocumentInputStream.java
@@ -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();
}
diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java b/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
index b96110fc46..a47b2d8300 100644
--- a/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
+++ b/src/java/org/apache/poi/poifs/filesystem/POIFSDocument.java
@@ -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());
}
/**
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java b/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
index c10a4c1c6e..6f14705685 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
@@ -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
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java b/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
index 3ce269c04e..dc220d7f40 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
@@ -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()));