aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-11-02 16:25:18 +0000
committerJaven O'Neal <onealj@apache.org>2016-11-02 16:25:18 +0000
commitc6f959bebbeb03fa7358512b3b6c53ae051362b6 (patch)
tree4e7e39fd7176059b92a690eb1f2098a429a37784 /src
parent735510592502ed3fe5f3b21314467c65802a216a (diff)
downloadpoi-c6f959bebbeb03fa7358512b3b6c53ae051362b6.tar.gz
poi-c6f959bebbeb03fa7358512b3b6c53ae051362b6.zip
bug 60331: remove deprecated EntryUtils.copyNodes( DirectoryEntry, DirectoryEntry, List<String> excepts). Use EntryUtils.copyNodes( FilteringDirectoryEntry, FilteringDirectoryEntry ) instead.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1767716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java5
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/EntryUtils.java20
2 files changed, 4 insertions, 21 deletions
diff --git a/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java b/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
index 78ee5512b7..79a91a4b68 100644
--- a/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
+++ b/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
@@ -24,6 +24,7 @@ import java.util.List;
import org.apache.poi.POIDocument;
import org.apache.poi.poifs.filesystem.EntryUtils;
+import org.apache.poi.poifs.filesystem.FilteringDirectoryNode;
import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.OPOIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
@@ -88,7 +89,9 @@ public class HPSFPropertiesOnlyDocument extends POIDocument {
writeProperties(fs, excepts);
// Copy over everything else unchanged
- EntryUtils.copyNodes(directory, fs.getRoot(), excepts);
+ FilteringDirectoryNode src = new FilteringDirectoryNode(directory, excepts);
+ FilteringDirectoryNode dest = new FilteringDirectoryNode(fs.getRoot(), excepts);
+ EntryUtils.copyNodes(src, dest);
// Caller will save the resultant POIFSFileSystem to the stream/file
}
diff --git a/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java b/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
index a4b452f4b8..18140d9df8 100644
--- a/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
+++ b/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
@@ -91,26 +91,6 @@ public class EntryUtils
}
/**
- * Copies nodes from one Directory to the other minus the excepts
- *
- * @param sourceRoot
- * is the source Directory to copy from
- * @param targetRoot
- * is the target Directory to copy to
- * @param excepts
- * is a list of Strings specifying what nodes NOT to copy
- * @deprecated POI 3.8 beta 5. Use {@link FilteringDirectoryNode} instead
- */
- public static void copyNodes( DirectoryEntry sourceRoot,
- DirectoryEntry targetRoot, List<String> excepts )
- throws IOException
- {
- FilteringDirectoryNode source = new FilteringDirectoryNode(sourceRoot, excepts);
- FilteringDirectoryNode target = new FilteringDirectoryNode(targetRoot, excepts);
- copyNodes( source, target );
- }
-
- /**
* Copies all nodes from one POIFS to the other
*
* @param source