You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/11/02 16:25:18 UTC

svn commit: r1767716 - in /poi/trunk/src/java/org/apache/poi: hpsf/HPSFPropertiesOnlyDocument.java poifs/filesystem/EntryUtils.java

Author: onealj
Date: Wed Nov  2 16:25:18 2016
New Revision: 1767716

URL: http://svn.apache.org/viewvc?rev=1767716&view=rev
Log:
bug 60331: remove deprecated EntryUtils.copyNodes( DirectoryEntry, DirectoryEntry, List<String> excepts). Use EntryUtils.copyNodes( FilteringDirectoryEntry, FilteringDirectoryEntry ) instead.

Modified:
    poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java

Modified: poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java?rev=1767716&r1=1767715&r2=1767716&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/HPSFPropertiesOnlyDocument.java Wed Nov  2 16:25:18 2016
@@ -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
         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
     }

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java?rev=1767716&r1=1767715&r2=1767716&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java Wed Nov  2 16:25:18 2016
@@ -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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org