mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
5118 remove uses of exception.printStacktrace
This commit is contained in:
parent
1cca4bf20a
commit
50e7d7e986
@ -573,7 +573,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel {
|
||||
examinerTextField.getText(), tfExaminerPhoneText.getText(),
|
||||
tfExaminerEmailText.getText(), taNotesText.getText()));
|
||||
} catch (CaseActionException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error updating case details", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,6 @@ public class StartupWindowProvider implements StartupWindowInterface {
|
||||
if (isRunningFromCommandLine()) {
|
||||
// Autopsy is running from command line
|
||||
logger.log(Level.INFO, "Running from command line"); //NON-NLS
|
||||
System.out.println("Running from command line");
|
||||
startupWindowToUse = new CommandLineStartupWindow();
|
||||
// kick off command line processing
|
||||
new CommandLineIngestManager().start();
|
||||
|
@ -74,7 +74,7 @@ final class ManageCorrelationPropertiesDialog extends javax.swing.JDialog {
|
||||
correlationTypes.clear();
|
||||
correlationTypes.addAll(dbManager.getDefinedCorrelationTypes());
|
||||
} catch (EamDbException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
LOGGER.log(Level.WARNING, "Error loading data", ex);
|
||||
}
|
||||
|
||||
correlationTypes.forEach((aType) -> {
|
||||
|
@ -78,7 +78,7 @@ public final class ManageOrganizationsDialog extends JDialog {
|
||||
setButtonsEnabled(organizationList.getSelectedValue());
|
||||
newOrg = null;
|
||||
} catch (EamDbException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error getting Central Repo for Organizations dialog", ex);
|
||||
}
|
||||
display();
|
||||
}
|
||||
|
@ -27,10 +27,11 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.ComboBoxModel;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* UI controls for Common Files Search scenario where the user intends to find
|
||||
@ -38,6 +39,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
*/
|
||||
public final class InterCasePanel extends javax.swing.JPanel {
|
||||
|
||||
private final static Logger logger = Logger.getLogger(InterCasePanel.class.getName());
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final Observable fileTypeFilterObservable;
|
||||
static final int NO_CASE_SELECTED = -1;
|
||||
@ -121,7 +123,7 @@ public final class InterCasePanel extends javax.swing.JPanel {
|
||||
this.correlationTypeComboBox.addItem(type.getDisplayName());
|
||||
}
|
||||
} catch (EamDbException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error getting correlation types", ex);
|
||||
}
|
||||
this.correlationTypeComboBox.setSelectedIndex(0);
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ public class MessageViewer extends JPanel implements RelationshipsViewer {
|
||||
try {
|
||||
rootTablePane.getExplorerManager().setSelectedNodes(new Node[0]);
|
||||
} catch (PropertyVetoException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error setting selected nodes", ex);
|
||||
}
|
||||
showThreadsPane();
|
||||
}//GEN-LAST:event_backButtonActionPerformed
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-18 Basis Technology Corp.
|
||||
* Copyright 2011-19 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -47,7 +47,6 @@ import org.openide.nodes.AbstractNode;
|
||||
import org.openide.nodes.Children;
|
||||
import org.openide.nodes.FilterNode;
|
||||
import org.openide.nodes.Node;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.NbBundle;
|
||||
import org.openide.util.lookup.Lookups;
|
||||
import org.sleuthkit.autopsy.corecomponents.ResultViewerPersistence.SortCriterion;
|
||||
@ -197,7 +196,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
|
||||
}
|
||||
|
||||
} catch (IllegalAccessException | InvocationTargetException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error getting value for thumbnail children", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,9 +24,11 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
|
||||
@ -40,7 +42,7 @@ public final class IngestProfiles {
|
||||
private static final String PROFILE_DESC_KEY = "Profile_Description";
|
||||
private static final String PROFILE_FILTER_KEY = "Profile_Filter";
|
||||
private static final String PROFILE_FILE_EXT = ".properties";
|
||||
|
||||
private static final Logger logger = Logger.getLogger(IngestProfiles.class.getName());
|
||||
/**
|
||||
* Gets the collection of profiles which currently exist.
|
||||
*
|
||||
@ -143,7 +145,7 @@ public final class IngestProfiles {
|
||||
Files.deleteIfExists(Paths.get(PlatformUtil.getUserConfigDirectory(), selectedProfile.getName() + PROFILE_FILE_EXT));
|
||||
FileUtils.deleteDirectory(IngestJobSettings.getSavedModuleSettingsFolder(selectedProfile.getName() + File.separator).toFile());
|
||||
} catch (IOException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error deleting directory for profile " + selectedProfile.getName(), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ final class InterestingArtifactCreatorIngestModule extends FileIngestModuleAdapt
|
||||
logger.log(Level.SEVERE, String.format("Failed to process file (obj_id = %d)", file.getId()), ex);
|
||||
return ProcessResult.ERROR;
|
||||
} catch (Blackboard.BlackboardException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Blackboard Exception processing file with obj_id = ", ex);
|
||||
}
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
|
@ -454,7 +454,6 @@ final class StringsTextExtractor implements TextExtractor {
|
||||
convertBuffRemain = bytesInConvertBuff - convertBuffOffset;
|
||||
}
|
||||
} catch (TskCoreException ex) {
|
||||
//Exceptions.printStackTrace(ex);
|
||||
fileEOF = true;
|
||||
}
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ public class GroupManager {
|
||||
|
||||
updateCurrentPathGroup(pathGroupKey);
|
||||
} catch (TskCoreException | TskDataException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error getting drawabledb for fileId " + fileId, ex);
|
||||
}
|
||||
|
||||
// Update all the groups that this file belongs to
|
||||
@ -986,7 +986,7 @@ public class GroupManager {
|
||||
.findAny().ifPresent(obj_id -> types.add(mimeType));
|
||||
}
|
||||
} catch (SQLException | TskCoreException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
logger.log(Level.WARNING, "Error getting group by MIME type", ex);
|
||||
}
|
||||
results.putAll(null, types);
|
||||
|
||||
|
@ -174,7 +174,6 @@ public class SortChooser<X, Y extends Comparator<X>> extends HBox {
|
||||
Image icon = (Image) item.getClass().getMethod("getIcon").invoke(item);
|
||||
setGraphic(new ImageView(icon));
|
||||
} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
|
||||
// Exceptions.printStackTrace(ex);
|
||||
setText(item.toString());
|
||||
setGraphic(null);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user