From a0949033a44b73cc27770afa8e2c0eca31a28260 Mon Sep 17 00:00:00 2001 From: jmillman Date: Fri, 17 Jul 2015 12:22:31 -0400 Subject: [PATCH] loosen restriction on worker passed into ContentUtils.writeToFile --- .../org/sleuthkit/autopsy/datamodel/ContentUtils.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java index 3223e29382..3860a9b0dd 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentUtils.java @@ -23,14 +23,15 @@ import java.io.IOException; import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.TimeZone; +import java.util.concurrent.Future; import java.util.logging.Level; import java.util.prefs.PreferenceChangeEvent; import java.util.prefs.PreferenceChangeListener; -import org.openide.util.NbBundle; -import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.SwingWorker; import org.netbeans.api.progress.ProgressHandle; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.core.UserPreferences; +import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.ContentVisitor; @@ -176,8 +177,8 @@ public final class ContentUtils { * @return number of bytes extracted * @throws IOException if file could not be written */ - public static long writeToFile(Content content, java.io.File outputFile, - ProgressHandle progress, SwingWorker worker, boolean source) throws IOException { + public static long writeToFile(Content content, java.io.File outputFile, + ProgressHandle progress, Future worker, boolean source) throws IOException { InputStream in = new ReadContentInputStream(content);