replace usage of removed ImageUtils.logContentError in IG

This commit is contained in:
jmillman 2016-01-04 15:26:12 -05:00
parent 960a2b5b61
commit b78b6ec345
2 changed files with 19 additions and 2 deletions

View File

@ -322,4 +322,22 @@ public abstract class DrawableFile<T extends AbstractFile> extends AbstractFile
return Collections.emptySet();
}
}
/**
* Get the unique path for this DrawableFile, or if that fails, just return
* the name.
*
* @param content
*
* @return
*/
public String getContentPathSafe() {
try {
return this.getUniquePath();
} catch (TskCoreException tskCoreException) {
String contentName = this.getName();
LOGGER.log(Level.SEVERE, "Failed to get unique path for " + contentName, tskCoreException); //NOI18N
return contentName;
}
}
}

View File

@ -43,7 +43,6 @@ import javafx.scene.media.MediaException;
import javafx.scene.media.MediaPlayer;
import org.controlsfx.control.MaskerPane;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.ThreadConfined;
import org.sleuthkit.autopsy.coreutils.ThreadConfined.ThreadType;
@ -325,7 +324,7 @@ public class SlideShowView extends DrawableTileBase {
final Media media = file.getMedia();
return new VideoPlayer(new MediaPlayer(media), file);
} catch (MediaException | IOException | OutOfMemoryError ex) {
ImageUtils.logContentError(LOGGER, Level.WARNING, "Failed to initialize VideoPlayer for {0} : " + ex.toString(), file);
LOGGER.log(Level.WARNING, "Failed to initialize VideoPlayer for {0} : " + ex.toString(), file.getContentPathSafe());
return doReadImageTask(file);
}
}