Merge remote-tracking branch 'upstream/develop' into mt-update

Conflicts:
	Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/FileExtMismatchIngestModule.java
	HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/HashDbIngestModule.java
This commit is contained in:
Samuel H. Kenyon 2014-04-22 15:48:51 -04:00
commit 30bb4ee6ae
206 changed files with 1748 additions and 1660 deletions

2
.gitignore vendored
View File

@ -53,6 +53,8 @@ genfiles.properties
!/test/output/gold
/test/output/gold/tmp
/test/script/ScriptLog.txt
/test/script/__pycache__/
/test/script/*.pyc
/test/build/
/test/dist/
/test/nbproject/*

View File

@ -57,21 +57,21 @@ public final class AddImageAction extends CallableSystemAction implements Presen
// Keys into the WizardDescriptor properties that pass information between stages of the wizard
// <TYPE>: <DESCRIPTION>
// String: time zone that the image is from
static final String TIMEZONE_PROP = "timeZone";
static final String TIMEZONE_PROP = "timeZone"; //NON-NLS
// String[]: array of paths to each data source selected
static final String DATASOURCEPATH_PROP = "dataSrcPath";
static final String DATASOURCEPATH_PROP = "dataSrcPath"; //NON-NLS
// String data source type selected
static final String DATASOURCETYPE_PROP = "dataSrcType";
static final String DATASOURCETYPE_PROP = "dataSrcType"; //NON-NLS
// CleanupTask: task to clean up the database file if wizard errors/is cancelled after it is created
static final String IMAGECLEANUPTASK_PROP = "finalFileCleanup";
static final String IMAGECLEANUPTASK_PROP = "finalFileCleanup"; //NON-NLS
// int: the next availble id for a new image
static final String IMAGEID_PROP = "imageId";
static final String IMAGEID_PROP = "imageId"; //NON-NLS
// AddImageProcess: the next availble id for a new image
static final String PROCESS_PROP = "process";
static final String PROCESS_PROP = "process"; //NON-NLS
// boolean: whether or not to lookup files in the hashDB
static final String LOOKUPFILES_PROP = "lookupFiles";
static final String LOOKUPFILES_PROP = "lookupFiles"; //NON-NLS
// boolean: whether or not to skip processing orphan files on FAT filesystems
static final String NOFATORPHANS_PROP = "nofatorphans";
static final String NOFATORPHANS_PROP = "nofatorphans"; //NON-NLS
static final Logger logger = Logger.getLogger(AddImageAction.class.getName());
@ -194,7 +194,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen
*/
@Override
public Component getToolbarPresenter() {
ImageIcon icon = new ImageIcon(getClass().getResource("btn_icon_add_image.png"));
ImageIcon icon = new ImageIcon(getClass().getResource("btn_icon_add_image.png")); //NON-NLS
toolbarButton.setIcon(icon);
toolbarButton.setText(this.getName());
return toolbarButton;
@ -261,7 +261,7 @@ public final class AddImageAction extends CallableSystemAction implements Presen
cleanup();
} catch (Exception ex) {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.log(Level.WARNING, "Error cleaning up from wizard.", ex);
logger.log(Level.WARNING, "Error cleaning up from wizard.", ex); //NON-NLS
} finally {
disable(); // cleanup tasks should only run once.
}

View File

@ -154,12 +154,12 @@ import org.sleuthkit.datamodel.TskException;
addImageProcess.run(new String[]{this.imagePath});
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Core errors occurred while running add image. ", ex);
logger.log(Level.SEVERE, "Core errors occurred while running add image. ", ex); //NON-NLS
//critical core/system error and process needs to be interrupted
hasCritError = true;
errorList.add(ex.getMessage());
} catch (TskDataException ex) {
logger.log(Level.WARNING, "Data errors occurred while running add image. ", ex);
logger.log(Level.WARNING, "Data errors occurred while running add image. ", ex); //NON-NLS
errorList.add(ex.getMessage());
}
@ -182,7 +182,7 @@ import org.sleuthkit.datamodel.TskException;
try {
imageId = addImageProcess.commit();
} catch (TskCoreException e) {
logger.log(Level.WARNING, "Errors occured while committing the image", e);
logger.log(Level.WARNING, "Errors occured while committing the image", e); //NON-NLS
errorList.add(e.getMessage());
} finally {
if (imageId != 0) {
@ -200,7 +200,7 @@ import org.sleuthkit.datamodel.TskException;
newContents.add(newImage);
}
logger.log(Level.INFO, "Image committed, imageId: {0}", imageId);
logger.log(Level.INFO, "Image committed, imageId: {0}", imageId); //NON-NLS
logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo());
}
}
@ -215,12 +215,12 @@ import org.sleuthkit.datamodel.TskException;
dirFetcher.interrupt();
if (cancelRequested() || hasCritError) {
logger.log(Level.WARNING, "Critical errors or interruption in add image process. Image will not be committed.");
logger.log(Level.WARNING, "Critical errors or interruption in add image process. Image will not be committed."); //NON-NLS
revert();
}
if (!errorList.isEmpty()) {
logger.log(Level.INFO, "There were errors that occured in add image process");
logger.log(Level.INFO, "There were errors that occured in add image process"); //NON-NLS
}
// When everything happens without an error:
@ -233,10 +233,10 @@ import org.sleuthkit.datamodel.TskException;
} catch (Exception ex) {
errorList.add(ex.getMessage());
// Log error/display warning
logger.log(Level.SEVERE, "Error adding image to case.", ex);
logger.log(Level.SEVERE, "Error adding image to case.", ex); //NON-NLS
}
} else {
logger.log(Level.SEVERE, "Missing image process object");
logger.log(Level.SEVERE, "Missing image process object"); //NON-NLS
}
// Tell the progress monitor we're done
@ -245,8 +245,8 @@ import org.sleuthkit.datamodel.TskException;
//handle unchecked exceptions post image add
errorList.add(ex.getMessage());
logger.log(Level.WARNING, "Unexpected errors occurred while running post add image cleanup. ", ex);
logger.log(Level.SEVERE, "Error adding image to case", ex);
logger.log(Level.WARNING, "Unexpected errors occurred while running post add image cleanup. ", ex); //NON-NLS
logger.log(Level.SEVERE, "Error adding image to case", ex); //NON-NLS
}
}
@ -288,7 +288,7 @@ import org.sleuthkit.datamodel.TskException;
interrupt();
}
catch (Exception ex) {
logger.log(Level.SEVERE, "Failed to interrupt the add image task...");
logger.log(Level.SEVERE, "Failed to interrupt the add image task..."); //NON-NLS
}
}
}
@ -299,7 +299,7 @@ import org.sleuthkit.datamodel.TskException;
private void interrupt() throws Exception {
try {
logger.log(Level.INFO, "interrupt() add image process");
logger.log(Level.INFO, "interrupt() add image process"); //NON-NLS
addImageProcess.stop(); //it might take time to truly stop processing and writing to db
} catch (TskCoreException ex) {
throw new Exception(NbBundle.getMessage(this.getClass(), "AddImageTask.interrupt.exception.msg"), ex);
@ -312,11 +312,11 @@ import org.sleuthkit.datamodel.TskException;
private void revert() {
if (!reverted) {
logger.log(Level.INFO, "Revert after add image process");
logger.log(Level.INFO, "Revert after add image process"); //NON-NLS
try {
addImageProcess.revert();
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error reverting add image process", ex);
logger.log(Level.WARNING, "Error reverting add image process", ex); //NON-NLS
}
reverted = true;
}

View File

@ -190,7 +190,7 @@ import org.openide.util.NbBundle;
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N NON-NLS
org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(AddImageWizardAddingProgressVisual.class, "AddImageWizardAddingProgressVisual.titleLabel.text")); // NOI18N
progressBar.setIndeterminate(true);

View File

@ -48,8 +48,8 @@ class AddImageWizardChooseDataSourcePanel implements WizardDescriptor.Panel<Wiza
private AddImageWizardAddingProgressPanel progressPanel;
private AddImageWizardChooseDataSourceVisual component;
private boolean isNextEnable = false;
private static final String PROP_LASTDATASOURCE_PATH = "LBL_LastDataSource_PATH";
private static final String PROP_LASTDATASOURCE_TYPE = "LBL_LastDataSource_TYPE";
private static final String PROP_LASTDATASOURCE_PATH = "LBL_LastDataSource_PATH"; //NON-NLS
private static final String PROP_LASTDATASOURCE_TYPE = "LBL_LastDataSource_TYPE"; //NON-NLS
// paths to any set hash lookup databases (can be null)
private String NSRLPath, knownBadPath;
@ -198,7 +198,7 @@ class AddImageWizardChooseDataSourcePanel implements WizardDescriptor.Panel<Wiza
cleanupTask.cleanup();
} catch (Exception ex) {
Logger logger = Logger.getLogger(AddImageWizardChooseDataSourcePanel.class.getName());
logger.log(Level.WARNING, "Error cleaning up image task", ex);
logger.log(Level.WARNING, "Error cleaning up image task", ex); //NON-NLS
} finally {
cleanupTask.disable();
}

View File

@ -118,7 +118,7 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
if (!datasourceProcessorsMap.containsKey(dsProcessor.getDataSourceType())) {
datasourceProcessorsMap.put(dsProcessor.getDataSourceType(), dsProcessor);
} else {
logger.log(Level.SEVERE, "discoverDataSourceProcessors(): A DataSourceProcessor already exists for type = {0}", dsProcessor.getDataSourceType());
logger.log(Level.SEVERE, "discoverDataSourceProcessors(): A DataSourceProcessor already exists for type = {0}", dsProcessor.getDataSourceType()); //NON-NLS
}
}
}
@ -250,7 +250,7 @@ final class AddImageWizardChooseDataSourceVisual extends JPanel {
.addContainerGap())
);
imgInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
imgInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N NON-NLS
org.openide.awt.Mnemonics.setLocalizedText(imgInfoLabel, org.openide.util.NbBundle.getMessage(AddImageWizardChooseDataSourceVisual.class, "AddImageWizardChooseDataSourceVisual.imgInfoLabel.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);

View File

@ -75,7 +75,7 @@ import javax.swing.JPanel;
setPreferredSize(new java.awt.Dimension(569, 300));
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N NON-NLS
titleLabel.setText(org.openide.util.NbBundle.getMessage(AddImageWizardIngestConfigVisual.class, "AddImageWizardIngestConfigVisual.titleLabel.text")); // NOI18N
subtitleLabel.setText(org.openide.util.NbBundle.getMessage(AddImageWizardIngestConfigVisual.class, "AddImageWizardIngestConfigVisual.subtitleLabel.text")); // NOI18N

View File

@ -97,7 +97,7 @@ import org.sleuthkit.datamodel.TskCoreException;
}
newContents.add(fileManager.addLocalFilesDirs(absLocalPaths, progUpdater));
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Errors occurred while running add logical files. ", ex);
logger.log(Level.WARNING, "Errors occurred while running add logical files. ", ex); //NON-NLS
hasCritError = true;
errorList.add(ex.getMessage());
}
@ -111,11 +111,11 @@ import org.sleuthkit.datamodel.TskCoreException;
private void postProcess() {
if (cancelRequested() || hasCritError) {
logger.log(Level.WARNING, "Handling errors or interruption that occured in logical files process");
logger.log(Level.WARNING, "Handling errors or interruption that occured in logical files process"); //NON-NLS
}
if (!errorList.isEmpty()) {
//data error (non-critical)
logger.log(Level.WARNING, "Handling non-critical errors that occured in logical files process");
logger.log(Level.WARNING, "Handling non-critical errors that occured in logical files process"); //NON-NLS
}
if (!(cancelRequested() || hasCritError)) {

View File

@ -67,7 +67,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
* Name for the property that determines whether to show the dialog at
* startup
*/
public static final String propStartup = "LBL_StartupDialog";
public static final String propStartup = "LBL_StartupDialog"; //NON-NLS
// pcs is initialized in CaseListener constructor
private static final PropertyChangeSupport pcs = new PropertyChangeSupport(Case.class);
@ -132,7 +132,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
private static Case currentCase = null;
private Services services;
private static final Logger logger = Logger.getLogger(Case.class.getName());
static final String CASE_EXTENSION = "aut";
static final String CASE_EXTENSION = "aut"; //NON-NLS
static final String CASE_DOT_EXTENSION = "." + CASE_EXTENSION;
/**
@ -192,7 +192,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.CURRENT_CASE.toString(), oldCase, null);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -204,7 +204,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.NAME.toString(), oldCase.name, "");
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -220,7 +220,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.CURRENT_CASE.toString(), null, currentCase);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -233,7 +233,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.NAME.toString(), "", currentCase.name);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case threw exception", e);
logger.log(Level.SEVERE, "Case threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(Case.class, "Case.moduleErr"),
NbBundle.getMessage(Case.class,
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -261,7 +261,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
* @param examiner the examiner for this case
*/
public static void create(String caseDir, String caseName, String caseNumber, String examiner) throws CaseActionException {
logger.log(Level.INFO, "Creating new case.\ncaseDir: {0}\ncaseName: {1}", new Object[]{caseDir, caseName});
logger.log(Level.INFO, "Creating new case.\ncaseDir: {0}\ncaseName: {1}", new Object[]{caseDir, caseName}); //NON-NLS
// create case directory if it doesn't already exist.
if (new File(caseDir).exists() == false) {
@ -274,12 +274,12 @@ public class Case implements SleuthkitCase.ErrorObserver {
xmlcm.create(caseDir, caseName, examiner, caseNumber); // create a new XML config file
xmlcm.writeFile();
String dbPath = caseDir + File.separator + "autopsy.db";
String dbPath = caseDir + File.separator + "autopsy.db"; //NON-NLS
SleuthkitCase db = null;
try {
db = SleuthkitCase.newCase(dbPath);
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir, ex);
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir, ex); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.create.exception.msg", caseName, caseDir), ex);
}
@ -297,7 +297,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
* @throws CaseActionException
*/
public static void open(String configFilePath) throws CaseActionException {
logger.log(Level.INFO, "Opening case.\nconfigFilePath: {0}", configFilePath);
logger.log(Level.INFO, "Opening case.\nconfigFilePath: {0}", configFilePath); //NON-NLS
try {
XMLCaseManagement xmlcm = new XMLCaseManagement();
@ -314,7 +314,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
String caseDir = xmlcm.getCaseDirectory();
String dbPath = caseDir + File.separator + "autopsy.db";
String dbPath = caseDir + File.separator + "autopsy.db"; //NON-NLS
SleuthkitCase db = SleuthkitCase.openCase(dbPath);
if (null != db.getBackupDatabasePath()) {
JOptionPane.showMessageDialog(null,
@ -331,7 +331,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
changeCase(openedCase);
} catch (Exception ex) {
logger.log(Level.SEVERE, "Error opening the case: ", ex);
logger.log(Level.SEVERE, "Error opening the case: ", ex); //NON-NLS
// close the previous case if there's any
CaseCloseAction closeCase = SystemAction.get(CaseCloseAction.class);
closeCase.actionPerformed(null);
@ -354,7 +354,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
}
}
} catch (TskException ex) {
logger.log(Level.WARNING, "Error getting image paths", ex);
logger.log(Level.WARNING, "Error getting image paths", ex); //NON-NLS
}
return imgPaths;
}
@ -382,7 +382,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
MissingImageDialog.makeDialog(obj_id, db);
} else {
logger.log(Level.WARNING, "Selected image files don't match old files!");
logger.log(Level.WARNING, "Selected image files don't match old files!"); //NON-NLS
}
}
@ -399,7 +399,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
*/
@Deprecated
public Image addImage(String imgPath, long imgId, String timeZone) throws CaseActionException {
logger.log(Level.INFO, "Adding image to Case. imgPath: {0} ID: {1} TimeZone: {2}", new Object[]{imgPath, imgId, timeZone});
logger.log(Level.INFO, "Adding image to Case. imgPath: {0} ID: {1} TimeZone: {2}", new Object[]{imgPath, imgId, timeZone}); //NON-NLS
try {
Image newImage = db.getImageById(imgId);
@ -408,7 +408,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.DATA_SOURCE_ADDED.toString(), null, newImage); // the new value is the instance of the image
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -445,7 +445,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.DATA_SOURCE_ADDED.toString(), null, newDataSource);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case threw exception", e);
logger.log(Level.SEVERE, "Case threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -494,7 +494,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
* @throws CaseActionException exception throw if case could not be deleted
*/
void deleteCase(File caseDir) throws CaseActionException {
logger.log(Level.INFO, "Deleting case.\ncaseDir: {0}", caseDir);
logger.log(Level.INFO, "Deleting case.\ncaseDir: {0}", caseDir); //NON-NLS
try {
@ -508,7 +508,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
NbBundle.getMessage(this.getClass(), "Case.deleteCase.exception.msg", caseDir));
}
} catch (Exception ex) {
logger.log(Level.SEVERE, "Error deleting the current case dir: " + caseDir, ex);
logger.log(Level.SEVERE, "Error deleting the current case dir: " + caseDir, ex); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "Case.deleteCase.exception.msg2", caseDir), ex);
}
@ -531,7 +531,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.NAME.toString(), oldCaseName, newCaseName);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -558,7 +558,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.EXAMINER.toString(), oldExaminer, newExaminer);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -584,7 +584,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
pcs.firePropertyChange(Events.NUMBER.toString(), oldCaseNumber, newCaseNumber);
}
catch (Exception e) {
logger.log(Level.SEVERE, "Case listener threw exception", e);
logger.log(Level.SEVERE, "Case listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "Case.moduleErr"),
NbBundle.getMessage(this.getClass(),
"Case.changeCase.errListenToCaseUpdates.msg"),
@ -753,7 +753,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
* @return relative path to the module output dir
*/
public static String getModulesOutputDirRelPath() {
return "ModuleOutput";
return "ModuleOutput"; //NON-NLS
}
/**
@ -819,7 +819,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
timezones.add(TimeZone.getTimeZone(image.getTimeZone()));
}
} catch (TskException ex) {
logger.log(Level.INFO, "Error getting time zones", ex);
logger.log(Level.INFO, "Error getting time zones", ex); //NON-NLS
}
}
return timezones;
@ -846,8 +846,8 @@ public class Case implements SleuthkitCase.ErrorObserver {
/**
* Does the given string refer to a physical drive?
*/
private static final String pdisk = "\\\\.\\physicaldrive";
private static final String dev = "/dev/";
private static final String pdisk = "\\\\.\\physicaldrive"; //NON-NLS
private static final String dev = "/dev/"; //NON-NLS
static boolean isPhysicalDrive(String path) {
return path.toLowerCase().startsWith(pdisk)
@ -1004,7 +1004,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
* @return boolean whether the case directory is successfully deleted or not
*/
static boolean deleteCaseDirectory(File casePath) {
logger.log(Level.INFO, "Deleting case directory: " + casePath.getAbsolutePath());
logger.log(Level.INFO, "Deleting case directory: " + casePath.getAbsolutePath()); //NON-NLS
return FileUtil.deleteDir(casePath);
}
@ -1067,21 +1067,21 @@ public class Case implements SleuthkitCase.ErrorObserver {
String modulesOutputDir = openedCase.getModulesOutputDirAbsPath();
File modulesOutputDirF = new File(modulesOutputDir);
if (!modulesOutputDirF.exists()) {
logger.log(Level.INFO, "Creating modules output dir for the case.");
logger.log(Level.INFO, "Creating modules output dir for the case."); //NON-NLS
try {
if (!modulesOutputDirF.mkdir()) {
logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir);
logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir); //NON-NLS
}
} catch (SecurityException e) {
logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir, e);
logger.log(Level.SEVERE, "Error creating modules output dir for the case, dir: " + modulesOutputDir, e); //NON-NLS
}
}
}
//case change helper
private static void doCaseChange(Case toChangeTo) {
logger.log(Level.INFO, "Changing Case to: " + toChangeTo);
logger.log(Level.INFO, "Changing Case to: " + toChangeTo); //NON-NLS
if (toChangeTo != null) { // new case is open
// clear the temp folder when the case is created / opened

View File

@ -53,7 +53,7 @@ import org.openide.util.actions.Presenter;
* The constructor for this class
*/
public CaseCloseAction() {
putValue("iconBase", "org/sleuthkit/autopsy/images/close-icon.png"); // put the icon
putValue("iconBase", "org/sleuthkit/autopsy/images/close-icon.png"); // put the icon NON-NLS
putValue(Action.NAME, NbBundle.getMessage(CaseCloseAction.class, "CTL_CaseCloseAct")); // put the action Name
// set action of the toolbar button
@ -90,7 +90,7 @@ import org.openide.util.actions.Presenter;
}
});
} catch (Exception ex) {
Logger.getLogger(CaseCloseAction.class.getName()).log(Level.WARNING, "Error closing case.", ex);
Logger.getLogger(CaseCloseAction.class.getName()).log(Level.WARNING, "Error closing case.", ex); //NON-NLS
}
}
@ -128,7 +128,7 @@ import org.openide.util.actions.Presenter;
*/
@Override
public Component getToolbarPresenter() {
ImageIcon icon = new ImageIcon(getClass().getResource("btn_icon_close_case.png"));
ImageIcon icon = new ImageIcon(getClass().getResource("btn_icon_close_case.png")); //NON-NLS
toolbarButton.setIcon(icon);
toolbarButton.setText(this.getName());
return toolbarButton;

View File

@ -95,7 +95,7 @@ import org.openide.util.actions.CallableSystemAction;
if(!caseFolder.exists()){
// throw an error
logger.log(Level.WARNING, "Couldn't delete case.", new Exception("The case directory doesn't exist."));
logger.log(Level.WARNING, "Couldn't delete case.", new Exception("The case directory doesn't exist.")); //NON-NLS
}
else{
// show the confirmation first to close the current case and open the "New Case" wizard panel
@ -114,7 +114,7 @@ import org.openide.util.actions.CallableSystemAction;
Case.getCurrentCase().deleteCase(caseFolder); // delete the current case
success = true;
} catch (CaseActionException ex) {
logger.log(Level.WARNING, "Could not delete the case folder: " + caseFolder);
logger.log(Level.WARNING, "Could not delete the case folder: " + caseFolder); //NON-NLS
}
// show notification whether the case has been deleted or it failed to delete...

View File

@ -41,7 +41,7 @@ import org.sleuthkit.autopsy.coreutils.Version;
public final class CaseOpenAction implements ActionListener {
private static final Logger logger = Logger.getLogger(CaseOpenAction.class.getName());
private static final String PROP_BASECASE = "LBL_BaseCase_PATH";
private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS
private final JFileChooser fc = new JFileChooser();
private FileFilter autFilter;
@ -59,7 +59,7 @@ public final class CaseOpenAction implements ActionListener {
fc.setFileFilter(autFilter);
try {
if (ModuleSettings.getConfigSetting(ModuleSettings.MAIN_SETTINGS, PROP_BASECASE) != null) {
fc.setCurrentDirectory(new File(ModuleSettings.getConfigSetting("Case", PROP_BASECASE)));
fc.setCurrentDirectory(new File(ModuleSettings.getConfigSetting("Case", PROP_BASECASE))); //NON-NLS
}
} catch (Exception e) {
}
@ -96,7 +96,7 @@ public final class CaseOpenAction implements ActionListener {
StartupWindowProvider.getInstance().close();
} catch (Exception ex) {
// no need to show the error message to the user.
logger.log(Level.WARNING, "Error closing startup window.", ex);
logger.log(Level.WARNING, "Error closing startup window.", ex); //NON-NLS
}
try {
Case.open(path); // open the case
@ -108,7 +108,7 @@ public final class CaseOpenAction implements ActionListener {
NbBundle.getMessage(this.getClass(),
"CaseOpenAction.msgDlg.cantOpenCase.title"),
JOptionPane.ERROR_MESSAGE);
logger.log(Level.WARNING, "Error opening case in folder " + path, ex);
logger.log(Level.WARNING, "Error opening case in folder " + path, ex); //NON-NLS
StartupWindowProvider.getInstance().open();
}

View File

@ -102,7 +102,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
popUpWindow.setVisible(true);
} catch (Exception ex) {
Logger.getLogger(CasePropertiesAction.class.getName()).log(Level.WARNING, "Error displaying Case Properties window.", ex);
Logger.getLogger(CasePropertiesAction.class.getName()).log(Level.WARNING, "Error displaying Case Properties window.", ex); //NON-NLS
}
}

View File

@ -90,7 +90,7 @@ class CasePropertiesForm extends javax.swing.JPanel{
int totalImages = imgPaths.size();
// create the headers and add all the rows
String[] headers = {"Path"};
String[] headers = {"Path"}; //NON-NLS
String[][] rows = new String[totalImages][];
int i = 0;
@ -191,7 +191,7 @@ class CasePropertiesForm extends javax.swing.JPanel{
jTextArea1.setRows(5);
jScrollPane1.setViewportView(jTextArea1);
casePropLabel.setFont(new java.awt.Font("Tahoma", 1, 24));
casePropLabel.setFont(new java.awt.Font("Tahoma", 1, 24)); //NON-NLS
casePropLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
casePropLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.casePropLabel.text")); // NOI18N
@ -213,10 +213,10 @@ class CasePropertiesForm extends javax.swing.JPanel{
}
});
genInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
genInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); //NON-NLS
genInfoLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.genInfoLabel.text")); // NOI18N
imgInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
imgInfoLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); //NON-NLS
imgInfoLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.imgInfoLabel.text")); // NOI18N
OKButton.setText(org.openide.util.NbBundle.getMessage(CasePropertiesForm.class, "CasePropertiesForm.OKButton.text")); // NOI18N
@ -226,7 +226,7 @@ class CasePropertiesForm extends javax.swing.JPanel{
},
new String [] {
"Path", "Remove"
"Path", "Remove" //NON-NLS
}
) {
boolean[] canEdit = new boolean [] {
@ -404,7 +404,7 @@ class CasePropertiesForm extends javax.swing.JPanel{
try {
current.updateCaseName(oldCaseName, oldPath , newCaseName, oldPath);
} catch (Exception ex) {
Logger.getLogger(CasePropertiesForm.class.getName()).log(Level.WARNING, "Error: problem updating case name.", ex);
Logger.getLogger(CasePropertiesForm.class.getName()).log(Level.WARNING, "Error: problem updating case name.", ex); //NON-NLS
}
}
}

View File

@ -79,7 +79,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
closeButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.closeButton.text")); // NOI18N
newCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png"))); // NOI18N
newCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_create_new_case.png"))); // NOI18N NON-NLS
newCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.newCaseButton.text")); // NOI18N
newCaseButton.setBorder(null);
newCaseButton.setBorderPainted(false);
@ -91,7 +91,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
}
});
openRecentButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_recent.png"))); // NOI18N
openRecentButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_recent.png"))); // NOI18N NON-NLS
openRecentButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openRecentButton.text")); // NOI18N
openRecentButton.setBorder(null);
openRecentButton.setBorderPainted(false);
@ -103,13 +103,13 @@ public class CueBannerPanel extends javax.swing.JPanel {
}
});
createNewLabel.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
createNewLabel.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N NON-NLS
createNewLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.createNewLabel.text")); // NOI18N
openRecentLabel.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
openRecentLabel.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N NON-NLS
openRecentLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openRecentLabel.text")); // NOI18N
openCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N
openCaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/btn_icon_open_existing.png"))); // NOI18N NON-NLS
openCaseButton.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openCaseButton.text")); // NOI18N
openCaseButton.setBorder(null);
openCaseButton.setBorderPainted(false);
@ -122,7 +122,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
}
});
openLabel.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
openLabel.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N NON-NLS
openLabel.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.openLabel.text")); // NOI18N
javax.swing.GroupLayout editorPanelLayout = new javax.swing.GroupLayout(editorPanel);
@ -163,7 +163,7 @@ public class CueBannerPanel extends javax.swing.JPanel {
.addContainerGap(25, Short.MAX_VALUE))
);
autopsyLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/welcome_logo.png"))); // NOI18N
autopsyLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/casemodule/welcome_logo.png"))); // NOI18N NON-NLS
autopsyLogo.setText(org.openide.util.NbBundle.getMessage(CueBannerPanel.class, "CueBannerPanel.autopsyLogo.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);

View File

@ -33,11 +33,12 @@ public class GeneralFilter extends FileFilter{
// Extensions & Descriptions for commonly used filters
public static final List<String> RAW_IMAGE_EXTS = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw", ".bin"});
public static final List<String> RAW_IMAGE_EXTS = Arrays.asList(new String[]{".img", ".dd", ".001", ".aa", ".raw", ".bin"}); //NON-NLS
public static final String RAW_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.rawImageDesc.text");
public static final List<String> ENCASE_IMAGE_EXTS = Arrays.asList(new String[]{".e01"});
public static final String ENCASE_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class, "GeneralFilter.encaseImageDesc.text");
public static final List<String> ENCASE_IMAGE_EXTS = Arrays.asList(new String[]{".e01"}); //NON-NLS
public static final String ENCASE_IMAGE_DESC = NbBundle.getMessage(GeneralFilter.class,
"GeneralFilter.encaseImageDesc.text");

View File

@ -43,7 +43,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
*/
public class ImageFilePanel extends JPanel implements DocumentListener {
private final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH";
private final String PROP_LASTIMAGE_PATH = "LBL_LastImage_PATH"; //NON-NLS
private static final Logger logger = Logger.getLogger(ImageFilePanel.class.getName());
private PropertyChangeSupport pcs = null;
private JFileChooser fc = new JFileChooser();
@ -201,7 +201,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
pcs.firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.FOCUS_NEXT.toString(), false, true);
}
catch (Exception e) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", e);
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
@ -295,7 +295,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
int offset = zone.getRawOffset() / 1000;
int hour = offset / 3600;
int minutes = (offset % 3600) / 60;
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id);
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id); //NON-NLS
/*
* DateFormat dfm = new SimpleDateFormat("z");
@ -313,7 +313,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
int thisOffset = thisTimeZone.getRawOffset() / 1000;
int thisHour = thisOffset / 3600;
int thisMinutes = (thisOffset % 3600) / 60;
String formatted = String.format("(GMT%+d:%02d) %s", thisHour, thisMinutes, thisTimeZone.getID());
String formatted = String.format("(GMT%+d:%02d) %s", thisHour, thisMinutes, thisTimeZone.getID()); //NON-NLS
// set the selected timezone
timeZoneComboBox.setSelectedItem(formatted);
@ -331,7 +331,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
pcs.firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
}
catch (Exception ee) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee);
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
@ -344,7 +344,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
pcs.firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
}
catch (Exception ee) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee);
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
@ -358,7 +358,7 @@ public class ImageFilePanel extends JPanel implements DocumentListener {
pcs.firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
}
catch (Exception ee) {
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee);
logger.log(Level.SEVERE, "ImageFilePanel listener threw exception", ee); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "ImageFilePanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);

View File

@ -269,7 +269,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
int offset = zone.getRawOffset() / 1000;
int hour = offset / 3600;
int minutes = (offset % 3600) / 60;
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id);
String item = String.format("(GMT%+d:%02d) %s", hour, minutes, id); //NON-NLS
/*
* DateFormat dfm = new SimpleDateFormat("z");
@ -287,7 +287,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
int thisOffset = thisTimeZone.getRawOffset() / 1000;
int thisHour = thisOffset / 3600;
int thisMinutes = (thisOffset % 3600) / 60;
String formatted = String.format("(GMT%+d:%02d) %s", thisHour, thisMinutes, thisTimeZone.getID());
String formatted = String.format("(GMT%+d:%02d) %s", thisHour, thisMinutes, thisTimeZone.getID()); //NON-NLS
// set the selected timezone
timeZoneComboBox.setSelectedItem(formatted);
@ -337,7 +337,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
pcs.firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
}
catch (Exception e) {
logger.log(Level.SEVERE, "LocalDiskPanel listener threw exception", e);
logger.log(Level.SEVERE, "LocalDiskPanel listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalDiskPanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "LocalDiskPanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);
@ -439,11 +439,11 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
try {
super.get(); //block and get all exceptions thrown while doInBackground()
} catch (CancellationException ex) {
logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible.");
logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS
} catch (InterruptedException ex) {
logger.log(Level.INFO, "Loading local disks was interrupted.");
logger.log(Level.INFO, "Loading local disks was interrupted."); //NON-NLS
} catch (Exception ex) {
logger.log(Level.SEVERE, "Fatal error when loading local disks", ex);
logger.log(Level.SEVERE, "Fatal error when loading local disks", ex); //NON-NLS
} finally {
if (!this.isCancelled()) {
enableNext = false;
@ -460,7 +460,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
diskComboBox.setSelectedIndex(0);
}
} else {
logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible.");
logger.log(Level.INFO, "Loading local disks was canceled, which should not be possible."); //NON-NLS
}
}
}

View File

@ -243,7 +243,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
pcs.firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
}
catch (Exception e) {
logger.log(Level.SEVERE, "LocalFilesPanel listener threw exception", e);
logger.log(Level.SEVERE, "LocalFilesPanel listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr"),
NbBundle.getMessage(this.getClass(), "LocalFilesPanel.moduleErr.msg"),
MessageNotifyUtil.MessageType.ERROR);

View File

@ -214,7 +214,7 @@ class MissingImageDialog extends javax.swing.JDialog {
.addContainerGap(62, Short.MAX_VALUE))
);
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
titleLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N NON-NLS
org.openide.awt.Mnemonics.setLocalizedText(titleLabel, org.openide.util.NbBundle.getMessage(MissingImageDialog.class, "MissingImageDialog.titleLabel.text")); // NOI18N
titleSeparator.setForeground(new java.awt.Color(102, 102, 102));
@ -256,7 +256,7 @@ class MissingImageDialog extends javax.swing.JDialog {
//TODO handle local files
db.setImagePaths(obj_id, Arrays.asList(new String[]{newPath}));
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error setting image paths", ex);
logger.log(Level.WARNING, "Error setting image paths", ex); //NON-NLS
}
this.dispose();
}//GEN-LAST:event_selectButtonActionPerformed

View File

@ -95,7 +95,7 @@ final class NewCaseVisualPanel1 extends JPanel implements DocumentListener{
jLabel2 = new javax.swing.JLabel();
caseDirTextField = new javax.swing.JTextField();
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N NON-NLS
org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.jLabel1.text_1")); // NOI18N
org.openide.awt.Mnemonics.setLocalizedText(caseNameLabel, org.openide.util.NbBundle.getMessage(NewCaseVisualPanel1.class, "NewCaseVisualPanel1.caseNameLabel.text_1")); // NOI18N

View File

@ -71,7 +71,7 @@ import org.openide.util.NbBundle;
examinerLabel.setText(org.openide.util.NbBundle.getMessage(NewCaseVisualPanel2.class, "NewCaseVisualPanel2.examinerLabel.text")); // NOI18N
optionalLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
optionalLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N NON-NLS
optionalLabel.setText(org.openide.util.NbBundle.getMessage(NewCaseVisualPanel2.class, "NewCaseVisualPanel2.optionalLabel.text")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);

View File

@ -67,7 +67,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
Case.getCurrentCase().closeCase(); // close the current case
newCaseAction(); // start the new case creation process
} catch (Exception ex) {
Logger.getLogger(NewCaseWizardAction.class.getName()).log(Level.WARNING, "Error closing case.", ex);
Logger.getLogger(NewCaseWizardAction.class.getName()).log(Level.WARNING, "Error closing case.", ex); //NON-NLS
}
}
} else {
@ -101,9 +101,9 @@ import org.sleuthkit.autopsy.coreutils.Logger;
// if Cancel button is pressed
if (isCancelled) {
String createdDirectory = (String) wizardDescriptor.getProperty("createdDirectory");
String createdDirectory = (String) wizardDescriptor.getProperty("createdDirectory"); //NON-NLS
if(createdDirectory != null) {
logger.log(Level.INFO, "Deleting a created case directory due to isCancelled set, dir: " + createdDirectory);
logger.log(Level.INFO, "Deleting a created case directory due to isCancelled set, dir: " + createdDirectory); //NON-NLS
Case.deleteCaseDirectory(new File(createdDirectory));
}
// if there's case opened, close the case

View File

@ -51,7 +51,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
private NewCaseVisualPanel1 component;
private Boolean isFinish = false;
private static String createdDirectory;
private static final String PROP_BASECASE = "LBL_BaseCase_PATH";
private static final String PROP_BASECASE = "LBL_BaseCase_PATH"; //NON-NLS
private static final Logger logger = Logger.getLogger(NewCaseWizardPanel1.class.getName());
/**
@ -171,13 +171,13 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
try {
String lastBaseDirectory = ModuleSettings.getConfigSetting(ModuleSettings.MAIN_SETTINGS, PROP_BASECASE);
component.getCaseParentDirTextField().setText(lastBaseDirectory);
createdDirectory = (String) settings.getProperty("createdDirectory");
createdDirectory = (String) settings.getProperty("createdDirectory"); //NON-NLS
if (createdDirectory != null && !createdDirectory.equals("")) {
logger.log(Level.INFO, "Deleting a case dir in readSettings(): " + createdDirectory);
logger.log(Level.INFO, "Deleting a case dir in readSettings(): " + createdDirectory); //NON-NLS
Case.deleteCaseDirectory(new File(createdDirectory));
}
} catch (Exception e) {
logger.log(Level.WARNING, "Could not read wizard settings in NewCaseWizardPanel1, ", e);
logger.log(Level.WARNING, "Could not read wizard settings in NewCaseWizardPanel1, ", e); //NON-NLS
}
}
@ -192,9 +192,9 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
*/
@Override
public void storeSettings(WizardDescriptor settings) {
settings.putProperty("caseName", getComponent().getCaseName());
settings.putProperty("caseParentDir", getComponent().getCaseParentDir());
settings.putProperty("createdDirectory", createdDirectory);
settings.putProperty("caseName", getComponent().getCaseName()); //NON-NLS
settings.putProperty("caseParentDir", getComponent().getCaseParentDir()); //NON-NLS
settings.putProperty("createdDirectory", createdDirectory); //NON-NLS
ModuleSettings.setConfigSetting(ModuleSettings.MAIN_SETTINGS, PROP_BASECASE, getComponent().getCaseParentDir());
}
@ -286,7 +286,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
Case.createCaseDirectory(caseDirPath);
success = true;
} catch (CaseActionException ex) {
logger.log(Level.SEVERE, "Could not createDirectory for the case, ", ex);
logger.log(Level.SEVERE, "Could not createDirectory for the case, ", ex); //NON-NLS
}
// check if the directory is successfully created
@ -309,7 +309,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
try {
StartupWindowProvider.getInstance().close();
} catch (Exception ex) {
logger.log(Level.WARNING, "Startup window didn't close as expected.", ex);
logger.log(Level.WARNING, "Startup window didn't close as expected.", ex); //NON-NLS
}

View File

@ -151,9 +151,9 @@ class NewCaseWizardPanel2 implements WizardDescriptor.ValidatingPanel<WizardDesc
*/
@Override
public void readSettings(WizardDescriptor settings) {
caseName = (String) settings.getProperty("caseName");
caseDir = (String) settings.getProperty("caseParentDir");
createdDirectory = (String) settings.getProperty("createdDirectory");
caseName = (String) settings.getProperty("caseName"); //NON-NLS
caseDir = (String) settings.getProperty("caseParentDir"); //NON-NLS
createdDirectory = (String) settings.getProperty("createdDirectory"); //NON-NLS
}
/**

View File

@ -184,7 +184,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
// Open the selected case
private void openCase() {
if (casePaths.length < 1) {
logger.log(Level.INFO, "No Case paths exist, cannot open the case");
logger.log(Level.INFO, "No Case paths exist, cannot open the case"); //NON-NLS
return;
}
String casePath = casePaths[imagesTable.getSelectedRow()];
@ -195,7 +195,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
StartupWindowProvider.getInstance().close();
CueBannerPanel.closeOpenRecentCasesWindow();
} catch (Exception ex) {
logger.log(Level.WARNING, "Error: couldn't open case: " + caseName, ex);
logger.log(Level.WARNING, "Error: couldn't open case: " + caseName, ex); //NON-NLS
}
// Open the recent cases
try {
@ -218,7 +218,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
Case.open(casePath); // open the case
}
} catch (CaseActionException ex) {
logger.log(Level.WARNING, "Error: couldn't open case: " + caseName, ex);
logger.log(Level.WARNING, "Error: couldn't open case: " + caseName, ex); //NON-NLS
}
}
}
@ -289,7 +289,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
ret = shortenPath(casePaths[rowIndex]);
break;
default:
logger.log(Level.SEVERE, "Invalid table column index: " + columnIndex);
logger.log(Level.SEVERE, "Invalid table column index: " + columnIndex); //NON-NLS
break;
}
return ret;

View File

@ -47,8 +47,8 @@ import org.sleuthkit.autopsy.coreutils.Logger;
final class RecentCases extends CallableSystemAction implements Presenter.Menu {
static final int LENGTH = 5;
static final String NAME_PROP_KEY = "LBL_RecentCase_Name";
static final String PATH_PROP_KEY = "LBL_RecentCase_Path";
static final String NAME_PROP_KEY = "LBL_RecentCase_Name"; //NON-NLS
static final String PATH_PROP_KEY = "LBL_RecentCase_Path"; //NON-NLS
static final RecentCase BLANK_RECENTCASE = new RecentCase("", "");
private final static RecentCases INSTANCE = new RecentCases();
@ -263,7 +263,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
// clear the properties file
storeRecentCases();
} catch (Exception ex) {
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not clear the properties file.", ex);
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not clear the properties file.", ex); //NON-NLS
}
}
@ -295,7 +295,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
try {
storeRecentCases();
} catch (Exception ex) {
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex);
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex); //NON-NLS
}
}
@ -322,7 +322,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
try {
storeRecentCases();
} catch (Exception ex) {
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex);
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex); //NON-NLS
}
}
@ -354,7 +354,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
try {
storeRecentCases();
} catch (Exception ex) {
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex);
Logger.getLogger(RecentCases.class.getName()).log(Level.WARNING, "Error: Could not update the properties file.", ex); //NON-NLS
}
}

View File

@ -82,7 +82,7 @@ class RecentItems implements ActionListener {
try {
Case.open(casePath); // open the case
} catch (CaseActionException ex) {
Logger.getLogger(RecentItems.class.getName()).log(Level.WARNING, "Error: Couldn't open recent case at " + casePath, ex);
Logger.getLogger(RecentItems.class.getName()).log(Level.WARNING, "Error: Couldn't open recent case at " + casePath, ex); //NON-NLS
}
}
}

View File

@ -59,10 +59,10 @@ public class StartupWindowProvider implements StartupWindowInterface {
int windowsCount = startupWindows.size();
if (windowsCount > 2) {
logger.log(Level.WARNING, "More than 2 (" + windowsCount + ") start up windows discovered, will use the first custom one");
logger.log(Level.WARNING, "More than 2 (" + windowsCount + ") start up windows discovered, will use the first custom one"); //NON-NLS
} else if (windowsCount == 1) {
startupWindowToUse = startupWindows.iterator().next();
logger.log(Level.INFO, "Will use the default startup window: " + startupWindowToUse.toString());
logger.log(Level.INFO, "Will use the default startup window: " + startupWindowToUse.toString()); //NON-NLS
} else {
//pick the non default one
Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
@ -70,14 +70,14 @@ public class StartupWindowProvider implements StartupWindowInterface {
StartupWindowInterface window = it.next();
if (!org.sleuthkit.autopsy.casemodule.StartupWindow.class.isInstance(window)) {
startupWindowToUse = window;
logger.log(Level.INFO, "Will use the custom startup window: " + startupWindowToUse.toString());
logger.log(Level.INFO, "Will use the custom startup window: " + startupWindowToUse.toString()); //NON-NLS
break;
}
}
if (startupWindowToUse == null) {
logger.log(Level.SEVERE, "Unexpected error, no custom startup window found, using the default");
logger.log(Level.SEVERE, "Unexpected error, no custom startup window found, using the default"); //NON-NLS
startupWindowToUse = new org.sleuthkit.autopsy.casemodule.StartupWindow();
}

View File

@ -48,32 +48,32 @@ import org.xml.sax.SAXException;
*/
class XMLCaseManagement implements CaseConfigFileInterface {
final static String XSDFILE = "CaseSchema.xsd";
final static String TOP_ROOT_NAME = "AutopsyCase";
final static String CASE_ROOT_NAME = "Case";
final static String XSDFILE = "CaseSchema.xsd"; //NON-NLS
final static String TOP_ROOT_NAME = "AutopsyCase"; //NON-NLS
final static String CASE_ROOT_NAME = "Case"; //NON-NLS
// general metadata about the case file
final static String NAME = "Name";
final static String NUMBER = "Number";
final static String EXAMINER = "Examiner";
final static String CREATED_DATE_NAME = "CreatedDate";
final static String MODIFIED_DATE_NAME = "ModifiedDate";
final static String SCHEMA_VERSION_NAME = "SchemaVersion";
final static String AUTOPSY_CRVERSION_NAME = "AutopsyCreatedVersion";
final static String AUTOPSY_MVERSION_NAME = "AutopsySavedVersion";
final static String NAME = "Name"; //NON-NLS
final static String NUMBER = "Number"; //NON-NLS
final static String EXAMINER = "Examiner"; //NON-NLS
final static String CREATED_DATE_NAME = "CreatedDate"; //NON-NLS
final static String MODIFIED_DATE_NAME = "ModifiedDate"; //NON-NLS
final static String SCHEMA_VERSION_NAME = "SchemaVersion"; //NON-NLS
final static String AUTOPSY_CRVERSION_NAME = "AutopsyCreatedVersion"; //NON-NLS
final static String AUTOPSY_MVERSION_NAME = "AutopsySavedVersion"; //NON-NLS
// folders inside case directory
final static String LOG_FOLDER_NAME = "LogFolder";
final static String LOG_FOLDER_RELPATH = "Log";
final static String TEMP_FOLDER_NAME = "TempFolder";
final static String TEMP_FOLDER_RELPATH = "Temp";
final static String EXPORT_FOLDER_NAME = "ExportFolder";
final static String EXPORT_FOLDER_RELPATH = "Export";
final static String CACHE_FOLDER_NAME = "CacheFolder";
final static String CACHE_FOLDER_RELPATH = "Cache";
final static String LOG_FOLDER_NAME = "LogFolder"; //NON-NLS
final static String LOG_FOLDER_RELPATH = "Log"; //NON-NLS
final static String TEMP_FOLDER_NAME = "TempFolder"; //NON-NLS
final static String TEMP_FOLDER_RELPATH = "Temp"; //NON-NLS
final static String EXPORT_FOLDER_NAME = "ExportFolder"; //NON-NLS
final static String EXPORT_FOLDER_RELPATH = "Export"; //NON-NLS
final static String CACHE_FOLDER_NAME = "CacheFolder"; //NON-NLS
final static String CACHE_FOLDER_RELPATH = "Cache"; //NON-NLS
// folders attribute
final static String RELATIVE_NAME = "Relative"; // relevant path info
final static String RELATIVE_NAME = "Relative"; // relevant path info NON-NLS
// folder attr values
final static String RELATIVE_TRUE = "true"; // if it's a relative path
final static String RELATIVE_FALSE = "false"; // if it's not a relative path
final static String RELATIVE_TRUE = "true"; // if it's a relative path NON-NLS
final static String RELATIVE_FALSE = "false"; // if it's not a relative path NON-NLS
// the document
private Document doc;
// general info
@ -504,22 +504,22 @@ import org.xml.sax.SAXException;
Element exportElement = doc.createElement(EXPORT_FOLDER_NAME); // <ExportFolder> ... </ExportFolder>
exportElement.appendChild(doc.createTextNode(EXPORT_FOLDER_RELPATH));
exportElement.setAttribute(RELATIVE_NAME, "true");
exportElement.setAttribute(RELATIVE_NAME, "true"); //NON-NLS
caseElement.appendChild(exportElement);
Element logElement = doc.createElement(LOG_FOLDER_NAME); // <LogFolder> ... </LogFolder>
logElement.appendChild(doc.createTextNode(LOG_FOLDER_RELPATH));
logElement.setAttribute(RELATIVE_NAME, "true");
logElement.setAttribute(RELATIVE_NAME, "true"); //NON-NLS
caseElement.appendChild(logElement);
Element tempElement = doc.createElement(TEMP_FOLDER_NAME); // <TempFolder> ... </TempFolder>
tempElement.appendChild(doc.createTextNode(TEMP_FOLDER_RELPATH));
tempElement.setAttribute(RELATIVE_NAME, "true");
tempElement.setAttribute(RELATIVE_NAME, "true"); //NON-NLS
caseElement.appendChild(tempElement);
Element cacheElement = doc.createElement(CACHE_FOLDER_NAME); // <CacheFolder> ... </CacheFolder>
cacheElement.appendChild(doc.createTextNode(CACHE_FOLDER_RELPATH));
cacheElement.setAttribute(RELATIVE_NAME, "true");
cacheElement.setAttribute(RELATIVE_NAME, "true"); //NON-NLS
caseElement.appendChild(cacheElement);
// write more code if needed ...
@ -551,19 +551,19 @@ import org.xml.sax.SAXException;
try {
xformer = tfactory.newTransformer();
} catch (TransformerConfigurationException ex) {
logger.log(Level.SEVERE, "Could not setup tranformer and write case file");
logger.log(Level.SEVERE, "Could not setup tranformer and write case file"); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.writeFile.exception.errWriteToFile.msg"), ex);
}
//Setup indenting to "pretty print"
xformer.setOutputProperty(OutputKeys.INDENT, "yes");
xformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
xformer.setOutputProperty(OutputKeys.INDENT, "yes"); //NON-NLS
xformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); //NON-NLS
try {
xformer.transform(source, result);
} catch (TransformerException ex) {
logger.log(Level.SEVERE, "Could not run tranformer and write case file");
logger.log(Level.SEVERE, "Could not run tranformer and write case file"); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(this.getClass(), "XMLCaseManagement.writeFile.exception.errWriteToFile.msg"), ex);
}
@ -579,7 +579,7 @@ import org.xml.sax.SAXException;
bw.flush();
bw.close();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Error writing to case file");
logger.log(Level.SEVERE, "Error writing to case file"); //NON-NLS
throw new CaseActionException("Error writing to case file", ex);
}
}
@ -620,7 +620,7 @@ import org.xml.sax.SAXException;
doc.getDocumentElement().normalize();
if (!XMLUtil.xmlIsValid(doc, XMLCaseManagement.class, XSDFILE)) {
logger.log(Level.WARNING, "Could not validate against [" + XSDFILE + "], results may not accurate");
logger.log(Level.WARNING, "Could not validate against [" + XSDFILE + "], results may not accurate"); //NON-NLS
}
Element rootEl = doc.getDocumentElement();

View File

@ -13,4 +13,5 @@ FileManager.addLocalDirInt.exception.notReadable.msg=Attempted to add a local di
FileManager.addLocalDirInt2.exception.closed.msg=Attempted to use FileManager after it was closed.
TagsManager.addContentTag.exception.beginByteOffsetOOR.msg=beginByteOffset \= {0} out of content size range (0 - {1})
TagsManager.addContentTag.exception.endByteOffsetOOR.msg=endByteOffset \= {0} out of content size range (0 - {1})
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
TagsManager.predefTagNames.bookmark.text=Bookmark

View File

@ -13,4 +13,5 @@ FileManager.addLocalDirInt.exception.notReadable.msg=\u8AAD\u307F\u53D6\u308A\u3
FileManager.addLocalDirInt2.exception.closed.msg=FileManager\u3092\u9589\u3058\u305F\u5F8C\u306B\u4F7F\u7528\u3092\u8A66\u307F\u307E\u3057\u305F\u3002
TagsManager.addContentTag.exception.beginByteOffsetOOR.msg=beginByteOffset \= {0} \u30B3\u30F3\u30C6\u30F3\u30C4\u30B5\u30A4\u30BA\u7BC4\u56F2(0 - {1})\u306E\u5916\u3067\u3059
TagsManager.addContentTag.exception.endByteOffsetOOR.msg=endByteOffset \= {0} \u30B3\u30F3\u30C6\u30F3\u30C4\u30B5\u30A4\u30BA\u7BC4\u56F2(0 - {1})\u306E\u5916\u3067\u3059
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
TagsManager.addContentTag.exception.endLTbegin.msg=endByteOffset < beginByteOffset
TagsManager.predefTagNames.bookmark.text=\u30D6\u30C3\u30AF\u30DE\u30FC\u30AF

View File

@ -73,7 +73,7 @@ public class FileManager implements Closeable {
}
}
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error initializing FileManager and getting number of local file sets");
logger.log(Level.SEVERE, "Error initializing FileManager and getting number of local file sets"); //NON-NLS
}

View File

@ -42,8 +42,8 @@ import org.sleuthkit.datamodel.TskCoreException;
* blackboard artifacts by users.
*/
public class TagsManager implements Closeable {
private static final String TAGS_SETTINGS_NAME = "Tags";
private static final String TAG_NAMES_SETTING_KEY = "TagNames";
private static final String TAGS_SETTINGS_NAME = "Tags"; //NON-NLS
private static final String TAG_NAMES_SETTING_KEY = "TagNames"; //NON-NLS
private final SleuthkitCase tskCase;
private final HashMap<String, TagName> uniqueTagNames = new HashMap<>();
private boolean tagNamesInitialized = false; // @@@ This is part of a work around to be removed when database access on the EDT is correctly synchronized.
@ -415,7 +415,7 @@ public class TagsManager implements Closeable {
}
}
catch (TskCoreException ex) {
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag types from the current case", ex);
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to get tag types from the current case", ex); //NON-NLS
}
}
@ -435,7 +435,7 @@ public class TagsManager implements Closeable {
uniqueTagNames.put(tagName.getDisplayName(), tagName);
}
catch (TskCoreException ex) {
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to add saved tag name " + tagNameAttributes[0], ex);
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to add saved tag name " + tagNameAttributes[0], ex); //NON-NLS
}
}
}
@ -443,13 +443,14 @@ public class TagsManager implements Closeable {
}
private void getPredefinedTagNames() {
if (!uniqueTagNames.containsKey("Bookmark")) {
if (!uniqueTagNames.containsKey(NbBundle.getMessage(this.getClass(), "TagsManager.predefTagNames.bookmark.text"))) {
try {
TagName tagName = tskCase.addTagName("Bookmark", "", TagName.HTML_COLOR.NONE);
TagName tagName = tskCase.addTagName(
NbBundle.getMessage(this.getClass(), "TagsManager.predefTagNames.bookmark.text"), "", TagName.HTML_COLOR.NONE);
uniqueTagNames.put(tagName.getDisplayName(), tagName);
}
catch (TskCoreException ex) {
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to add predefined 'Bookmark' tag name", ex);
Logger.getLogger(TagsManager.class.getName()).log(Level.SEVERE, "Failed to add predefined 'Bookmark' tag name", ex); //NON-NLS
}
}
}

View File

@ -100,23 +100,23 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer
}
private void setText(String str) {
jTextPane1.setText("<html><body>" + str + "</body></html>");
jTextPane1.setText("<html><body>" + str + "</body></html>"); //NON-NLS
}
private void startTable(StringBuilder sb) {
sb.append("<table>");
sb.append("<table>"); //NON-NLS
}
private void endTable(StringBuilder sb) {
sb.append("</table>");
sb.append("</table>"); //NON-NLS
}
private void addRow(StringBuilder sb, String key, String value) {
sb.append("<tr><td>");
sb.append("<tr><td>"); //NON-NLS
sb.append(key);
sb.append("</td><td>");
sb.append("</td><td>"); //NON-NLS
sb.append(value);
sb.append("</td></tr>");
sb.append("</td></tr>"); //NON-NLS
}
@Override

View File

@ -29,7 +29,7 @@ import javax.swing.text.html.StyleSheet;
public class Utilities {
public static void configureTextPaneAsHtml(JTextPane pane) {
pane.setContentType("text/html;charset=UTF-8");
pane.setContentType("text/html;charset=UTF-8"); //NON-NLS
HTMLEditorKit kit = new HTMLEditorKit();
pane.setEditorKit(kit);
StyleSheet styleSheet = kit.getStyleSheet();
@ -40,11 +40,11 @@ public class Utilities {
* method that sets consistent styles for all viewers and takes font
* size as an argument.
*/
styleSheet.addRule("body {font-family:Arial;font-size:14pt;}");
styleSheet.addRule("p {font-family:Arial;font-size:14pt;}");
styleSheet.addRule("li {font-family:Arial;font-size:14pt;}");
styleSheet.addRule("td {font-family:Arial;font-size:14pt;overflow:hidden;padding-right:5px;padding-left:5px;}");
styleSheet.addRule("th {font-family:Arial;font-size:14pt;overflow:hidden;padding-right:5px;padding-left:5px;font-weight:bold;}");
styleSheet.addRule("p {font-family:Arial;font-size:14pt;}");
styleSheet.addRule("body {font-family:Arial;font-size:14pt;}"); //NON-NLS
styleSheet.addRule("p {font-family:Arial;font-size:14pt;}"); //NON-NLS
styleSheet.addRule("li {font-family:Arial;font-size:14pt;}"); //NON-NLS
styleSheet.addRule("td {font-family:Arial;font-size:14pt;overflow:hidden;padding-right:5px;padding-left:5px;}"); //NON-NLS
styleSheet.addRule("th {font-family:Arial;font-size:14pt;overflow:hidden;padding-right:5px;padding-left:5px;font-weight:bold;}"); //NON-NLS
styleSheet.addRule("p {font-family:Arial;font-size:14pt;}"); //NON-NLS
}
}

View File

@ -61,31 +61,31 @@ public class Installer extends ModuleInstall {
//Note: if shipping with a different CRT version, this will only print a warning
//and try to use linker mechanism to find the correct versions of libs.
//We should update this if we officially switch to a new version of CRT/compiler
System.loadLibrary("msvcr100");
System.loadLibrary("msvcp100");
logger.log(Level.INFO, "MS CRT libraries loaded");
System.loadLibrary("msvcr100"); //NON-NLS
System.loadLibrary("msvcp100"); //NON-NLS
logger.log(Level.INFO, "MS CRT libraries loaded"); //NON-NLS
} catch (UnsatisfiedLinkError e) {
logger.log(Level.SEVERE, "Error loading ms crt libraries, ", e);
logger.log(Level.SEVERE, "Error loading ms crt libraries, ", e); //NON-NLS
}
try {
System.loadLibrary("zlib");
logger.log(Level.INFO, "ZLIB library loaded loaded");
System.loadLibrary("zlib"); //NON-NLS
logger.log(Level.INFO, "ZLIB library loaded loaded"); //NON-NLS
} catch (UnsatisfiedLinkError e) {
logger.log(Level.SEVERE, "Error loading ZLIB library, ", e);
logger.log(Level.SEVERE, "Error loading ZLIB library, ", e); //NON-NLS
}
try {
System.loadLibrary("libewf");
logger.log(Level.INFO, "EWF library loaded");
System.loadLibrary("libewf"); //NON-NLS
logger.log(Level.INFO, "EWF library loaded"); //NON-NLS
} catch (UnsatisfiedLinkError e) {
logger.log(Level.SEVERE, "Error loading EWF library, ", e);
logger.log(Level.SEVERE, "Error loading EWF library, ", e); //NON-NLS
}
}
}
public Installer() {
logger.log(Level.INFO, "core installer created");
logger.log(Level.INFO, "core installer created"); //NON-NLS
javaFxInit = false;
packageInstallers = new ArrayList<ModuleInstall>();
@ -132,12 +132,12 @@ public class Installer extends ModuleInstall {
public void restored() {
super.restored();
logger.log(Level.INFO, "restored()");
logger.log(Level.INFO, "restored()"); //NON-NLS
initJavaFx();
for (ModuleInstall mi : packageInstallers) {
logger.log(Level.INFO, mi.getClass().getName() + " restored()");
logger.log(Level.INFO, mi.getClass().getName() + " restored()"); //NON-NLS
try {
mi.restored();
} catch (Exception e) {
@ -151,9 +151,9 @@ public class Installer extends ModuleInstall {
public void validate() throws IllegalStateException {
super.validate();
logger.log(Level.INFO, "validate()");
logger.log(Level.INFO, "validate()"); //NON-NLS
for (ModuleInstall mi : packageInstallers) {
logger.log(Level.INFO, mi.getClass().getName() + " validate()");
logger.log(Level.INFO, mi.getClass().getName() + " validate()"); //NON-NLS
try {
mi.validate();
} catch (Exception e) {
@ -166,10 +166,10 @@ public class Installer extends ModuleInstall {
public void uninstalled() {
super.uninstalled();
logger.log(Level.INFO, "uninstalled()");
logger.log(Level.INFO, "uninstalled()"); //NON-NLS
for (ModuleInstall mi : packageInstallers) {
logger.log(Level.INFO, mi.getClass().getName() + " uninstalled()");
logger.log(Level.INFO, mi.getClass().getName() + " uninstalled()"); //NON-NLS
try {
mi.uninstalled();
} catch (Exception e) {
@ -185,7 +185,7 @@ public class Installer extends ModuleInstall {
public void close() {
super.close();
logger.log(Level.INFO, "close()");
logger.log(Level.INFO, "close()"); //NON-NLS
//exit JavaFx plat
if (javaFxInit) {
@ -193,7 +193,7 @@ public class Installer extends ModuleInstall {
}
for (ModuleInstall mi : packageInstallers) {
logger.log(Level.INFO, mi.getClass().getName() + " close()");
logger.log(Level.INFO, mi.getClass().getName() + " close()"); //NON-NLS
try {
mi.close();
} catch (Exception e) {

View File

@ -30,7 +30,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact;
*/
public interface BlackboardResultViewer {
public static final String FINISHED_DISPLAY_EVT = "FINISHED_DISPLAY_EVT";
public static final String FINISHED_DISPLAY_EVT = "FINISHED_DISPLAY_EVT"; //NON-NLS
/**

View File

@ -55,11 +55,11 @@ public class CoreComponentControl {
Collection<? extends DataExplorer> dataExplorers = Lookup.getDefault().lookupAll(DataExplorer.class);
for (DataExplorer de : dataExplorers) {
TopComponent explorerWin = de.getTopComponent();
Mode m = WindowManager.getDefault().findMode("explorer");
Mode m = WindowManager.getDefault().findMode("explorer"); //NON-NLS
if (m != null) {
m.dockInto(explorerWin); // redock into the explorer mode
} else {
logger.log(Level.WARNING, "Could not find explorer mode and dock explorer window");
logger.log(Level.WARNING, "Could not find explorer mode and dock explorer window"); //NON-NLS
}
explorerWin.open(); // open that top component
}
@ -70,7 +70,7 @@ public class CoreComponentControl {
if (m != null) {
m.dockInto(contentWin); // redock into the output mode
} else {
logger.log(Level.WARNING, "Could not find output mode and dock content window");
logger.log(Level.WARNING, "Could not find output mode and dock content window"); //NON-NLS
}
contentWin.open(); // open that top component
@ -98,7 +98,7 @@ public class CoreComponentControl {
for (TopComponent tc : mode.getTopComponents()) {
tcName = tc.getName();
if (tcName == null) {
logger.log(Level.INFO, "tcName was null");
logger.log(Level.INFO, "tcName was null"); //NON-NLS
tcName = "";
}
// switch requires constant strings, so converted to if/else.

View File

@ -93,7 +93,7 @@ public class AboutWindowPanel extends JPanel implements HyperlinkListener {
jScrollPane3.setBorder(null);
copyright.setBorder(null);
copyright.setContentType("text/html"); // NOI18N
copyright.setContentType("text/html"); // NOI18N NON-NLS
copyright.setEditable(false);
copyright.setText(org.openide.util.NbBundle.getBundle(AboutWindowPanel.class).getString("LBL_Copyright")); // NOI18N
copyright.addMouseListener(new java.awt.event.MouseAdapter() {
@ -103,7 +103,7 @@ public class AboutWindowPanel extends JPanel implements HyperlinkListener {
});
jScrollPane3.setViewportView(copyright);
description.setContentType("text/html"); // NOI18N
description.setContentType("text/html"); // NOI18N NON-NLS
description.setEditable(false);
jScrollPane2.setViewportView(description);
@ -208,7 +208,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
private void showUrl() {
if (url != null) {
org.openide.awt.StatusDisplayer.getDefault().setStatusText(
NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser"));
NbBundle.getBundle(HTMLViewAction.class).getString("CTL_OpeningBrowser")); //NON-NLS
HtmlBrowser.URLDisplayer.getDefault().showURL(url);
}
}
@ -219,25 +219,25 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
private static String getProductVersionValue() {
return MessageFormat.format(
NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"),
NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion"), //NON-NLS
new Object[]{System.getProperty("netbeans.buildnumber")});
}
private static String getOperatingSystemValue() {
return NbBundle.getMessage(AboutWindowPanel.class, "Format_OperatingSystem_Value",
System.getProperty("os.name",
System.getProperty("os.name", //NON-NLS
NbBundle.getMessage(AboutWindowPanel.class,
"ProductInformationPanel.propertyUnknown.text")),
System.getProperty("os.version",
System.getProperty("os.version", //NON-NLS
NbBundle.getMessage(AboutWindowPanel.class,
"ProductInformationPanel.propertyUnknown.text")),
System.getProperty("os.arch",
System.getProperty("os.arch", //NON-NLS
NbBundle.getMessage(AboutWindowPanel.class,
"ProductInformationPanel.propertyUnknown.text")));
}
private static String getJavaValue() {
return System.getProperty("java.version",
return System.getProperty("java.version", //NON-NLS
NbBundle.getMessage(AboutWindowPanel.class,
"ProductInformationPanel.propertyUnknown.text"));
}
@ -245,10 +245,10 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
private static String getVMValue() {
return NbBundle.getMessage(AboutWindowPanel.class,
"ProductInformationPanel.getVMValue.text",
System.getProperty("java.vm.name",
System.getProperty("java.vm.name", //NON-NLS
NbBundle.getMessage(AboutWindowPanel.class,
"ProductInformationPanel.propertyUnknown.text")),
System.getProperty("java.vm.version", ""));
System.getProperty("java.vm.version", "")); //NON-NLS
}
private static String getSystemLocaleValue() {
@ -261,7 +261,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
}
private static String getEncodingValue() {
return System.getProperty("file.encoding",
return System.getProperty("file.encoding", //NON-NLS
NbBundle.getMessage(AboutWindowPanel.class, "ProductInformationPanel.propertyUnknown.text"));
}
@ -283,7 +283,7 @@ private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:eve
*/
public void startVerboseLogging() {
verboseLogging = true;
String logPath = PlatformUtil.getUserDirectory() + File.separator + "sleuthkit.txt";
String logPath = PlatformUtil.getUserDirectory() + File.separator + "sleuthkit.txt"; //NON-NLS
SleuthkitJNI.startVerboseLogging(logPath);
}

View File

@ -111,7 +111,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
try {
this.em.setSelectedNodes(selected);
} catch (PropertyVetoException ex) {
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex);
logger.log(Level.WARNING, "Couldn't set selected nodes.", ex); //NON-NLS
}
}

View File

@ -132,7 +132,7 @@ import org.sleuthkit.datamodel.TskCoreException;
try {
path = content.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content);
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() for {0}", content); //NON-NLS
}
setName(path);
} else {
@ -164,7 +164,7 @@ import org.sleuthkit.datamodel.TskCoreException;
// get the preference for the preferred viewer
Preferences pref = NbPreferences.forModule(GeneralPanel.class);
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false);
boolean keepCurrentViewer = pref.getBoolean("keepPreferredViewer", false); //NON-NLS
int currTabIndex = jTabbedPane1.getSelectedIndex();
int totalTabs = jTabbedPane1.getTabCount();

View File

@ -52,7 +52,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
// contains a list of the undocked TCs
private static ArrayList<DataContentTopComponent> newWindowList = new ArrayList<DataContentTopComponent>();
private static final String PREFERRED_ID = "DataContentTopComponent";
private static final String PREFERRED_ID = "DataContentTopComponent"; //NON-NLS
private static final String DEFAULT_NAME = NbBundle.getMessage(DataContentTopComponent.class, "CTL_DataContentTopComponent");
private static final String TOOLTIP_TEXT = NbBundle.getMessage(DataContentTopComponent.class, "HINT_DataContentTopComponent");
@ -67,7 +67,7 @@ public final class DataContentTopComponent extends TopComponent implements DataC
add(dataContentPanel);
putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.valueOf(isDefault)); // prevent option to close compoment in GUI
logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this);
logger.log(Level.INFO, "Created DataContentTopComponent instance: " + this); //NON-NLS
}
/**
@ -119,15 +119,15 @@ public final class DataContentTopComponent extends TopComponent implements DataC
public static synchronized DataContentTopComponent findInstance() {
TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
if (win == null) {
logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system.");
logger.warning("Cannot find " + PREFERRED_ID + " component. It will not be located properly in the window system."); //NON-NLS
return getDefault();
}
if (win instanceof DataContentTopComponent) {
return (DataContentTopComponent) win;
}
logger.warning(
"There seem to be multiple components with the '" + PREFERRED_ID
+ "' ID. That is a potential source of errors and unexpected behavior.");
"There seem to be multiple components with the '" + PREFERRED_ID //NON-NLS
+ "' ID. That is a potential source of errors and unexpected behavior."); //NON-NLS
return getDefault();
}

View File

@ -106,7 +106,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
jPanel1.setPreferredSize(new java.awt.Dimension(622, 424));
outputViewPane.setEditable(false);
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
jScrollPane1.setViewportView(outputViewPane);
@ -124,14 +124,14 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.nextPageButton.text")); // NOI18N
nextPageButton.setBorderPainted(false);
nextPageButton.setContentAreaFilled(false);
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
nextPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
nextPageButtonActionPerformed(evt);
@ -143,14 +143,14 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
pageLabel2.setPreferredSize(new java.awt.Dimension(29, 14));
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.prevPageButton.text")); // NOI18N
prevPageButton.setBorderPainted(false);
prevPageButton.setContentAreaFilled(false);
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
prevPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
prevPageButtonActionPerformed(evt);
@ -325,7 +325,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
return content.getAllArtifactsCount() > 0;
}
catch (TskException ex) {
logger.log(Level.WARNING, "Couldn't get count of BlackboardArtifacts for content", ex);
logger.log(Level.WARNING, "Couldn't get count of BlackboardArtifacts for content", ex); //NON-NLS
}
}
return false;
@ -450,7 +450,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
artifacts = content.getAllArtifacts();
}
catch (TskException ex) {
logger.log(Level.WARNING, "Couldn't get artifacts", ex);
logger.log(Level.WARNING, "Couldn't get artifacts", ex); //NON-NLS
return new ViewUpdate(getArtifactContentStrings().size(), currentPage, ERROR_TEXT);
}
@ -493,7 +493,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
}
}
catch (TskCoreException ex) {
logger.log(Level.WARNING, "Couldn't get associated artifact to display in Content Viewer.", ex);
logger.log(Level.WARNING, "Couldn't get associated artifact to display in Content Viewer.", ex); //NON-NLS
}
}
@ -530,7 +530,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
}
}
catch (InterruptedException | ExecutionException ex) {
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex);
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex); //NON-NLS
}
}
}
@ -577,7 +577,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat
}
}
catch (InterruptedException | ExecutionException ex) {
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex);
logger.log(Level.WARNING, "Artifact display task unexpectedly interrupted or failed", ex); //NON-NLS
}
}
}

View File

@ -56,7 +56,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
initComponents();
customizeComponents();
this.resetComponent();
logger.log(Level.INFO, "Created HexView instance: " + this);
logger.log(Level.INFO, "Created HexView instance: " + this); //NON-NLS
}
private void customizeComponents() {
@ -114,7 +114,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
jScrollPane1.setBackground(new java.awt.Color(255, 255, 255));
outputViewPane.setEditable(false);
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS
outputViewPane.setMinimumSize(new java.awt.Dimension(700, 20));
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
jScrollPane1.setViewportView(outputViewPane);
@ -133,28 +133,28 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerHex.class, "DataContentViewerHex.prevPageButton.text")); // NOI18N
prevPageButton.setBorderPainted(false);
prevPageButton.setContentAreaFilled(false);
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
prevPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
prevPageButtonActionPerformed(evt);
}
});
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerHex.class, "DataContentViewerHex.nextPageButton.text")); // NOI18N
nextPageButton.setBorderPainted(false);
nextPageButton.setContentAreaFilled(false);
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
nextPageButton.setPreferredSize(new java.awt.Dimension(23, 23));
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
nextPageButtonActionPerformed(evt);
@ -318,7 +318,7 @@ public class DataContentViewerHex extends javax.swing.JPanel implements DataCont
} catch (TskException ex) {
errorText = NbBundle.getMessage(this.getClass(), "DataContentViewerHex.setDataView.errorText", offset,
offset + pageLength);
logger.log(Level.WARNING, "Error while trying to show the hex content.", ex);
logger.log(Level.WARNING, "Error while trying to show the hex content.", ex); //NON-NLS
}
}

View File

@ -21,7 +21,9 @@ package org.sleuthkit.autopsy.corecomponents;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import javax.imageio.ImageIO;
@ -33,6 +35,8 @@ import org.openide.util.lookup.ServiceProviders;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer;
import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
/**
@ -43,18 +47,19 @@ import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM;
})
public class DataContentViewerMedia extends javax.swing.JPanel implements DataContentViewer {
private static final String[] AUDIO_EXTENSIONS = new String[]{".mp3", ".wav", ".wma"};
private static final String[] AUDIO_EXTENSIONS = new String[]{".mp3", ".wav", ".wma"}; //NON-NLS
private static final Logger logger = Logger.getLogger(DataContentViewerMedia.class.getName());
private AbstractFile lastFile;
//UI
private final MediaViewVideoPanel videoPanel;
private final String[] videoExtensions; // get them from the panel
private String[] imageExtensions; // use javafx supported
private final List<String> supportedMimes;
private final MediaViewImagePanel imagePanel;
private boolean videoPanelInited;
private boolean imagePanelInited;
private static final String IMAGE_VIEWER_LAYER = "IMAGE";
private static final String VIDEO_VIEWER_LAYER = "VIDEO";
private static final String IMAGE_VIEWER_LAYER = "IMAGE"; //NON-NLS
private static final String VIDEO_VIEWER_LAYER = "VIDEO"; //NON-NLS
/**
* Creates new form DataContentViewerVideo
@ -69,11 +74,11 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
imagePanel = new MediaViewImagePanel();
videoPanelInited = videoPanel.isInited();
imagePanelInited = imagePanel.isInited();
videoExtensions = videoPanel.getExtensions();
supportedMimes = videoPanel.getMimeTypes();
customizeComponents();
logger.log(Level.INFO, "Created MediaView instance: " + this);
logger.log(Level.INFO, "Created MediaView instance: " + this); //NON-NLS
}
private void customizeComponents() {
@ -131,7 +136,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
lastFile = file;
final Dimension dims = DataContentViewerMedia.this.getSize();
logger.info("setting node on media viewer");
logger.info("setting node on media viewer"); //NON-NLS
if (imagePanelInited && containsExt(file.getName(), imageExtensions)) {
imagePanel.showImageFx(file, dims);
this.switchPanels(false);
@ -141,12 +146,13 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
this.switchPanels(false);
} else if (videoPanelInited
&& (containsExt(file.getName(), videoExtensions) || containsExt(file.getName(), AUDIO_EXTENSIONS))) {
&& containsMimeType(selectedNode,supportedMimes)&&(containsExt(file.getName(), videoExtensions) || containsExt(file.getName(), AUDIO_EXTENSIONS))) {
videoPanel.setupVideo(file, dims);
switchPanels(true);
}
} catch (Exception e) {
logger.log(Level.SEVERE, "Exception while setting node", e);
logger.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS
}
}
@ -218,8 +224,8 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
}
if (videoPanelInited && videoPanel.isInited()) {
if (containsExt(name, AUDIO_EXTENSIONS)
|| (containsExt(name, videoExtensions))) {
if ((containsExt(name, AUDIO_EXTENSIONS)
|| containsExt(name, videoExtensions))&& containsMimeType(node,supportedMimes)) {
return true;
}
}
@ -254,4 +260,26 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo
}
return Arrays.asList(exts).contains(ext);
}
private static boolean containsMimeType(Node node, List<String> mimeTypes) {
if (mimeTypes.isEmpty()) {
//this should return true for 32 bit autopsy with the gstreamer MimeTypes list being empty,
//since mimetype detection is for java fx only. For 64 bit java fx, the code continues for Mimetype detection.
return true;
}
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
try {
ArrayList<BlackboardAttribute> genInfoAttributes = file.getGenInfoAttributes(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG);
if (genInfoAttributes.isEmpty() == false) {
for (BlackboardAttribute batt : genInfoAttributes) {
if (mimeTypes.contains(batt.getValueString())) {
return true;
}
}
return false;
}
} catch (TskCoreException ex) {
return false;
}
return false;
}
}

View File

@ -63,7 +63,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
initComponents();
customizeComponents();
this.resetComponent();
logger.log(Level.INFO, "Created StringView instance: " + this);
logger.log(Level.INFO, "Created StringView instance: " + this); //NON-NLS
}
private void customizeComponents() {
@ -130,7 +130,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
jPanel1.setPreferredSize(new java.awt.Dimension(502, 424));
outputViewPane.setEditable(false);
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N
outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N NON-NLS NON-NLS
outputViewPane.setPreferredSize(new java.awt.Dimension(700, 400));
jScrollPane1.setViewportView(outputViewPane);
@ -148,14 +148,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
pageLabel.setMinimumSize(new java.awt.Dimension(33, 14));
pageLabel.setPreferredSize(new java.awt.Dimension(33, 14));
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.nextPageButton.text")); // NOI18N
nextPageButton.setBorderPainted(false);
nextPageButton.setContentAreaFilled(false);
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
nextPageButton.setPreferredSize(new java.awt.Dimension(55, 23));
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
nextPageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
nextPageButtonActionPerformed(evt);
@ -167,14 +167,14 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14));
pageLabel2.setPreferredSize(new java.awt.Dimension(29, 14));
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerString.class, "DataContentViewerString.prevPageButton.text")); // NOI18N
prevPageButton.setBorderPainted(false);
prevPageButton.setContentAreaFilled(false);
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
prevPageButton.setPreferredSize(new java.awt.Dimension(55, 23));
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
prevPageButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
prevPageButtonActionPerformed(evt);
@ -356,7 +356,7 @@ public class DataContentViewerString extends javax.swing.JPanel implements DataC
text = NbBundle.getMessage(this.getClass(),
"DataContentViewerString.setDataView.errorText", currentOffset,
currentOffset + pageLength);
logger.log(Level.WARNING, "Error while trying to show the String content.", ex);
logger.log(Level.WARNING, "Error while trying to show the String content.", ex); //NON-NLS
}
}

View File

@ -348,8 +348,8 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
@Override
public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
if (pcs == null) {
logger.log(Level.WARNING, "Could not add listener to DataResultPanel, "
+ "listener support not fully initialized yet, listener: " + listener.toString() );
logger.log(Level.WARNING, "Could not add listener to DataResultPanel, " //NON-NLS
+ "listener support not fully initialized yet, listener: " + listener.toString() ); //NON-NLS
}
else {
this.pcs.addPropertyChangeListener(listener);

View File

@ -239,15 +239,15 @@ public class DataResultTopComponent extends TopComponent implements DataResult,
//putClientProperty("TopComponentAllowDockAnywhere", Boolean.TRUE);
Mode mode = WindowManager.getDefault().findMode(customModeName);
if (mode != null) {
StringBuilder message = new StringBuilder("Found custom mode, setting: ");
StringBuilder message = new StringBuilder("Found custom mode, setting: "); //NON-NLS
message.append(customModeName);
logger.log(Level.INFO, message.toString());
mode.dockInto(this);
} else {
StringBuilder message = new StringBuilder("Could not find mode: ");
StringBuilder message = new StringBuilder("Could not find mode: "); //NON-NLS
message.append(customModeName);
message.append(", will dock into the default one");
message.append(", will dock into the default one"); //NON-NLS
logger.log(Level.WARNING, message.toString());
}
}

View File

@ -320,15 +320,15 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
//First property column is sortable, but also sorted initially, so
//initially this one will have the arrow icon:
if (props.size() > 0) {
props.get(0).setValue("TreeColumnTTV", Boolean.TRUE); // Identifies special property representing first (tree) column.
props.get(0).setValue("SortingColumnTTV", Boolean.TRUE); // TreeTableView should be initially sorted by this property column.
props.get(0).setValue("TreeColumnTTV", Boolean.TRUE); // Identifies special property representing first (tree) column. NON-NLS
props.get(0).setValue("SortingColumnTTV", Boolean.TRUE); // TreeTableView should be initially sorted by this property column. NON-NLS
}
// The rest of the columns are sortable, but not initially sorted,
// so initially will have no arrow icon:
String[] propStrings = new String[props.size() * 2];
for (int i = 0; i < props.size(); i++) {
props.get(i).setValue("ComparableColumnTTV", Boolean.TRUE);
props.get(i).setValue("ComparableColumnTTV", Boolean.TRUE); //NON-NLS
propStrings[2 * i] = props.get(i).getName();
propStrings[2 * i + 1] = props.get(i).getDisplayName();
}
@ -414,7 +414,7 @@ public class DataResultViewerTable extends AbstractDataResultViewer {
try {
rowValues[rowCount][j] = properties[j].getValue();
} catch (IllegalAccessException | InvocationTargetException ignore) {
rowValues[rowCount][j] = "n/a";
rowValues[rowCount][j] = "n/a"; //NON-NLS
}
}
}

View File

@ -129,25 +129,25 @@ import org.sleuthkit.datamodel.TskCoreException;
pagesLabel.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagesLabel.text")); // NOI18N
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N
pagePrevButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N NON-NLS
pagePrevButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pagePrevButton.text")); // NOI18N
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N
pagePrevButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N NON-NLS
pagePrevButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
pagePrevButton.setPreferredSize(new java.awt.Dimension(55, 23));
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N
pagePrevButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N NON-NLS
pagePrevButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
pagePrevButtonActionPerformed(evt);
}
});
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N
pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N NON-NLS
pageNextButton.setText(org.openide.util.NbBundle.getMessage(DataResultViewerThumbnail.class, "DataResultViewerThumbnail.pageNextButton.text")); // NOI18N
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N
pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N NON-NLS
pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0));
pageNextButton.setMaximumSize(new java.awt.Dimension(27, 23));
pageNextButton.setMinimumSize(new java.awt.Dimension(27, 23));
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N
pageNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N NON-NLS
pageNextButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
pageNextButtonActionPerformed(evt);
@ -446,7 +446,7 @@ import org.sleuthkit.datamodel.TskCoreException;
ex.getMessage()),
NotifyDescriptor.ERROR_MESSAGE);
DialogDisplayer.getDefault().notify(d);
logger.log(Level.SEVERE, "Error making thumbnails: " + ex.getMessage());
logger.log(Level.SEVERE, "Error making thumbnails: " + ex.getMessage()); //NON-NLS
} // catch and ignore if we were cancelled
catch (java.util.concurrent.CancellationException ex) {
}
@ -581,7 +581,7 @@ import org.sleuthkit.datamodel.TskCoreException;
filePathLabel.setToolTipText(uPath);
}
catch (TskCoreException e){
logger.log(Level.WARNING, "Could not get unique path for content: {0}", af.getName());
logger.log(Level.WARNING, "Could not get unique path for content: {0}", af.getName()); //NON-NLS
}
}
}

View File

@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.corecomponents;
import java.awt.Dimension;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CancellationException;
import java.util.logging.Level;
@ -81,7 +82,9 @@ import org.sleuthkit.autopsy.core.Installer;
})
public class FXVideoPanel extends MediaViewVideoPanel {
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".mpg", ".mpeg"};
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".mpg", ".mpeg"}; //NON-NLS
static private final List<String> supportedMimes = Arrays.asList("audio/x-aiff", "video/x-javafx", "video/x-flv", "application/vnd.apple.mpegurl", " audio/mpegurl", "audio/mpeg", "video/mp4","audio/x-m4a","video/x-m4v","audio/x-wav"); //NON-NLS
private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
private boolean fxInited = false;
// FX Components
@ -149,7 +152,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
try {
path = file.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Cannot get unique path of video file");
logger.log(Level.SEVERE, "Cannot get unique path of video file"); //NON-NLS
}
mediaPane.setInfoLabelText(path);
mediaPane.setInfoLabelToolTipText(path);
@ -257,9 +260,9 @@ public class FXVideoPanel extends MediaViewVideoPanel {
try {
extractedBytes = ContentUtils.writeToFile(sFile, jFile, progress, this, true);
} catch (IOException ex) {
logger.log(Level.WARNING, "Error buffering file", ex);
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
}
logger.log(Level.INFO, "Done buffering: " + jFile.getName());
logger.log(Level.INFO, "Done buffering: " + jFile.getName()); //NON-NLS
success = true;
return null;
}
@ -270,15 +273,15 @@ public class FXVideoPanel extends MediaViewVideoPanel {
try {
super.get(); //block and get all exceptions thrown while doInBackground()
} catch (CancellationException ex) {
logger.log(Level.INFO, "Media buffering was canceled.");
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
} catch (InterruptedException ex) {
logger.log(Level.INFO, "Media buffering was interrupted.");
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
} catch (Exception ex) {
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex);
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
} finally {
progress.finish();
if (!this.isCancelled()) {
logger.log(Level.INFO, "ExtractMedia in done: " + jFile.getName());
logger.log(Level.INFO, "ExtractMedia in done: " + jFile.getName()); //NON-NLS
try {
Platform.runLater(new Runnable() {
@Override
@ -287,7 +290,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
}
});
} catch(MediaException e) {
logger.log(Level.WARNING, "something went wrong with javafx", e);
logger.log(Level.WARNING, "something went wrong with javafx", e); //NON-NLS
reset();
mediaPane.setInfoLabelText(e.getMessage());
return;
@ -323,7 +326,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
private int totalHours;
private int totalMinutes;
private int totalSeconds;
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d ";
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
/** The EventHandler for MediaPlayer.onReady(). **/
private final ReadyListener READY_LISTENER = new ReadyListener();
@ -344,12 +347,12 @@ public class FXVideoPanel extends MediaViewVideoPanel {
private static final String PAUSE_TEXT = "||";
private static final String STOP_TEXT = "X";
private static final String STOP_TEXT = "X"; //NON-NLS
public MediaPane() {
// Video Display
mediaViewPane = new HBox();
mediaViewPane.setStyle("-fx-background-color: black");
mediaViewPane.setStyle("-fx-background-color: black"); //NON-NLS
mediaViewPane.setAlignment(Pos.CENTER);
mediaView = new MediaView();
mediaViewPane.getChildren().add(mediaView);
@ -378,7 +381,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
mediaTools.getChildren().add(progressLabel);
controlPanel.getChildren().add(mediaTools);
controlPanel.setStyle("-fx-background-color: white");
controlPanel.setStyle("-fx-background-color: white"); //NON-NLS
infoLabel = new Label("");
controlPanel.getChildren().add(infoLabel);
setBottom(controlPanel);
@ -423,7 +426,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
* @param text
*/
public void setInfoLabelText(final String text) {
logger.log(Level.INFO, "Setting Info Label Text: " + text);
logger.log(Level.INFO, "Setting Info Label Text: " + text); //NON-NLS
Platform.runLater(new Runnable() {
@Override
public void run() {
@ -470,7 +473,7 @@ public class FXVideoPanel extends MediaViewVideoPanel {
mediaPlayer.play();
break;
default:
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString());
logger.log(Level.INFO, "MediaPlayer in unexpected state: " + status.toString()); //NON-NLS
// If the MediaPlayer is in an unexpected state, stop playback.
mediaPlayer.stop();
setInfoLabelText(NbBundle.getMessage(this.getClass(),
@ -798,4 +801,9 @@ public class FXVideoPanel extends MediaViewVideoPanel {
public String[] getExtensions() {
return EXTENSIONS;
}
@Override
public List<String> getMimeTypes() {
return supportedMimes;
}
}

View File

@ -101,7 +101,7 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
try {
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
} catch (Exception e) {
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e);
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr"),
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr.msg"),
@ -112,7 +112,7 @@ public final class GeneralOptionsPanelController extends OptionsPanelController
try {
pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
} catch (Exception e) {
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e);
logger.log(Level.SEVERE, "GeneralOptionsPanelController listener threw exception", e); //NON-NLS
MessageNotifyUtil.Notify.show(
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr"),
NbBundle.getMessage(this.getClass(), "GeneralOptionsPanelController.moduleErr.msg"),

View File

@ -25,10 +25,10 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
final class GeneralPanel extends javax.swing.JPanel {
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer";
private static final String USE_LOCAL_TIME = "useLocalTime";
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true
private static final String KEEP_PREFERRED_VIEWER = "keepPreferredViewer"; //NON-NLS
private static final String USE_LOCAL_TIME = "useLocalTime"; //NON-NLS
private static final String DS_HIDE_KNOWN = "dataSourcesHideKnown"; // Default false NON-NLS
private static final String VIEWS_HIDE_KNOWN = "viewsHideKnown"; // Default true NON-NLS
private final Preferences prefs = NbPreferences.forModule(this.getClass());
GeneralPanel(GeneralOptionsPanelController controller) {

View File

@ -24,6 +24,7 @@ import java.awt.image.BufferedImage;
import java.io.IOException;
import java.nio.IntBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@ -71,7 +72,7 @@ import org.sleuthkit.datamodel.TskData;
})
public class GstVideoPanel extends MediaViewVideoPanel {
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".3gp", ".avi", ".mpg", ".mpeg", ".wmv"};
private static final String[] EXTENSIONS = new String[]{".mov", ".m4v", ".flv", ".mp4", ".3gp", ".avi", ".mpg", ".mpeg", ".wmv"}; //NON-NLS
private static final Logger logger = Logger.getLogger(GstVideoPanel.class.getName());
private boolean gstInited;
@ -88,7 +89,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
private final Object playbinLock = new Object(); // lock for synchronization of gstPlaybin2 player
private AbstractFile currentFile;
private Set<String> badVideoFiles = Collections.synchronizedSet(new HashSet<String>());
static private final List<String> supportedMimes = Arrays.asList();
/**
* Creates new form MediaViewVideoPanel
*/
@ -143,12 +144,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
if (gstPlaybin2 != null && !autoTracking) {
State orig = gstPlaybin2.getState();
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
if (gstPlaybin2.seek(ClockTime.fromMillis(time)) == false) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.seek() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.seek() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
@ -161,19 +162,19 @@ public class GstVideoPanel extends MediaViewVideoPanel {
private boolean initGst() {
try {
logger.log(Level.INFO, "Initializing gstreamer for video/audio viewing");
logger.log(Level.INFO, "Initializing gstreamer for video/audio viewing"); //NON-NLS
Gst.init();
gstInited = true;
} catch (GstException e) {
gstInited = false;
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and frame extraction capabilities", e);
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and frame extraction capabilities", e); //NON-NLS
MessageNotifyUtil.Notify.error(
NbBundle.getMessage(this.getClass(), "GstVideoPanel.initGst.gstException.msg"),
e.getMessage());
return false;
} catch (UnsatisfiedLinkError | NoClassDefFoundError | Exception e) {
gstInited = false;
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and extraction capabilities", e);
logger.log(Level.SEVERE, "Error initializing gstreamer for audio/video viewing and extraction capabilities", e); //NON-NLS
MessageNotifyUtil.Notify.error(
NbBundle.getMessage(this.getClass(), "GstVideoPanel.initGst.otherException.msg"),
e.getMessage());
@ -201,7 +202,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
try {
path = file.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Cannot get unique path of video file");
logger.log(Level.SEVERE, "Cannot get unique path of video file"); //NON-NLS
}
infoLabel.setText(path);
infoLabel.setToolTipText(path);
@ -215,7 +216,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
if (gstPlaybin2 != null) {
gstPlaybin2.dispose();
}
gstPlaybin2 = new PlayBin2("VideoPlayer");
gstPlaybin2 = new PlayBin2("VideoPlayer"); //NON-NLS
gstPlaybin2.setVideoSink(gstVideoComponent.getElement());
videoPanel.removeAll();
@ -229,7 +230,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
gstPlaybin2.setInputFile(ioFile);
if (gstPlaybin2.setState(State.READY) == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
}
}
@ -255,13 +256,13 @@ public class GstVideoPanel extends MediaViewVideoPanel {
if (gstPlaybin2 != null) {
if (gstPlaybin2.isPlaying()) {
if (gstPlaybin2.stop() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
}
if (gstPlaybin2.setState(State.NULL) == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.NULL) failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.NULL) failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
@ -324,8 +325,8 @@ public class GstVideoPanel extends MediaViewVideoPanel {
}
// set up a PlayBin2 object
RGBDataSink videoSink = new RGBDataSink("rgb", rgbListener);
PlayBin2 playbin = new PlayBin2("VideoFrameCapture");
RGBDataSink videoSink = new RGBDataSink("rgb", rgbListener); //NON-NLS
PlayBin2 playbin = new PlayBin2("VideoFrameCapture"); //NON-NLS
playbin.setInputFile(file);
playbin.setVideoSink(videoSink);
@ -373,7 +374,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
//System.out.println("Seeking to " + timeStamp + "milliseconds.");
if (!playbin.seek(timeStamp, unit)) {
logger.log(Level.INFO, "There was a problem seeking to " + timeStamp + " " + unit.name().toLowerCase());
logger.log(Level.INFO, "There was a problem seeking to " + timeStamp + " " + unit.name().toLowerCase()); //NON-NLS
}
ret = playbin.play();
@ -389,7 +390,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
try {
lock.wait(FRAME_CAPTURE_TIMEOUT_MILLIS);
} catch (InterruptedException e) {
logger.log(Level.INFO, "InterruptedException occurred while waiting for frame capture.", e);
logger.log(Level.INFO, "InterruptedException occurred while waiting for frame capture.", e); //NON-NLS
}
}
Image image = rgbListener.getImage();
@ -403,7 +404,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
}
if (image == null) {
logger.log(Level.WARNING, "There was a problem while trying to capture a frame from file " + file.getName());
logger.log(Level.WARNING, "There was a problem while trying to capture a frame from file " + file.getName()); //NON-NLS
badVideoFiles.add(file.getName());
break;
}
@ -533,27 +534,27 @@ public class GstVideoPanel extends MediaViewVideoPanel {
State state = gstPlaybin2.getState();
if (state.equals(State.PLAYING)) {
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
pauseButton.setText("");
// Is this call necessary considering we just called gstPlaybin2.pause()?
if (gstPlaybin2.setState(State.PAUSED) == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PAUSED) failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PAUSED) failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
} else if (state.equals(State.PAUSED)) {
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
pauseButton.setText("||");
// Is this call necessary considering we just called gstPlaybin2.play()?
if (gstPlaybin2.setState(State.PLAYING) == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PLAYING) failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.PLAYING) failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
@ -576,7 +577,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
private class VideoProgressWorker extends SwingWorker<Object, Object> {
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d ";
private String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
private long millisElapsed = 0;
private final long INTER_FRAME_PERIOD_MS = 20;
private final long END_TIME_MARGIN_MS = 50;
@ -592,12 +593,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
synchronized (playbinLock) {
if (gstPlaybin2 != null) {
if (gstPlaybin2.stop() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.stop() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
}
// ready to be played again
if (gstPlaybin2.setState(State.READY) == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.setState(State.READY) failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
}
gstPlaybin2.getState(); //NEW
@ -675,7 +676,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
try {
get();
} catch (InterruptedException | ExecutionException ex) {
logger.log(Level.WARNING, "Error updating video progress: " + ex.getMessage());
logger.log(Level.WARNING, "Error updating video progress: " + ex.getMessage()); //NON-NLS
infoLabel.setText(NbBundle.getMessage(this.getClass(), "GstVideoPanel.progress.infoLabel.updateErr",
ex.getMessage()));
}
@ -721,7 +722,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
try {
extractedBytes = ContentUtils.writeToFile(sFile, jFile, progress, this, true);
} catch (IOException ex) {
logger.log(Level.WARNING, "Error buffering file", ex);
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
}
success = true;
return null;
@ -733,11 +734,11 @@ public class GstVideoPanel extends MediaViewVideoPanel {
try {
super.get(); //block and get all exceptions thrown while doInBackground()
} catch (CancellationException ex) {
logger.log(Level.INFO, "Media buffering was canceled.");
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
} catch (InterruptedException ex) {
logger.log(Level.INFO, "Media buffering was interrupted.");
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
} catch (Exception ex) {
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex);
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
} finally {
progress.finish();
if (!this.isCancelled()) {
@ -755,12 +756,12 @@ public class GstVideoPanel extends MediaViewVideoPanel {
synchronized (playbinLock) {
// must play, then pause and get state to get duration.
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
if (gstPlaybin2.pause() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.pause() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
return;
}
@ -786,7 +787,7 @@ public class GstVideoPanel extends MediaViewVideoPanel {
synchronized (playbinLock) {
if (gstPlaybin2.play() == StateChangeReturn.FAILURE) {
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed.");
logger.log(Level.WARNING, "Attempt to call PlayBin2.play() failed."); //NON-NLS
infoLabel.setText(MEDIA_PLAYER_ERROR_STRING);
}
}
@ -802,4 +803,9 @@ public class GstVideoPanel extends MediaViewVideoPanel {
public String[] getExtensions() {
return EXTENSIONS;
}
@Override
public List<String> getMimeTypes() {
return supportedMimes;
}
}

View File

@ -85,7 +85,7 @@ public class Installer extends ModuleInstall {
//UIManager.put("nimbusBlueGrey", new Color());
//UIManager.put("control", new Color());
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
if (System.getProperty("os.name").toLowerCase().contains("mac")) { //NON-NLS
setupMacOsXLAF();
}
@ -101,10 +101,10 @@ public class Installer extends ModuleInstall {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException
| IllegalAccessException | UnsupportedLookAndFeelException ex) {
logger.log(Level.WARNING, "Unable to set theme. ", ex);
logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS
}
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI",
final String[] UI_MENU_ITEM_KEYS = new String[]{"MenuBarUI", //NON-NLS
};
Map<Object, Object> uiEntries = new TreeMap<>();
@ -117,12 +117,12 @@ public class Installer extends ModuleInstall {
//use Metal if available
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
if ("Nimbus".equals(info.getName())) { //NON-NLS
try {
UIManager.setLookAndFeel(info.getClassName());
} catch (ClassNotFoundException | InstantiationException |
IllegalAccessException | UnsupportedLookAndFeelException ex) {
logger.log(Level.WARNING, "Unable to set theme. ", ex);
logger.log(Level.WARNING, "Unable to set theme. ", ex); //NON-NLS
}
break;
}

View File

@ -150,7 +150,7 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
//original input stream
BufferedImage bi = ImageIO.read(inputStream);
if (bi == null) {
logger.log(Level.WARNING, "Could image reader not found for file: " + fileName);
logger.log(Level.WARNING, "Could image reader not found for file: " + fileName); //NON-NLS
return;
}
//scale image using Scalr
@ -158,10 +158,10 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
//convert from awt imageto fx image
fxImage = SwingFXUtils.toFXImage(biScaled, null);
} catch (IOException ex) {
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName, ex);
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName, ex); //NON-NLS
return;
} catch (OutOfMemoryError ex) {
logger.log(Level.WARNING, "Could not load image file into media view (too large): " + fileName, ex);
logger.log(Level.WARNING, "Could not load image file into media view (too large): " + fileName, ex); //NON-NLS
MessageNotifyUtil.Notify.warn(
NbBundle.getMessage(this.getClass(), "MediaViewImagePanel.imgFileTooLarge.msg", file.getName()),
ex.getMessage());
@ -170,12 +170,12 @@ import org.sleuthkit.datamodel.ReadContentInputStream;
try {
inputStream.close();
} catch (IOException ex) {
logger.log(Level.WARNING, "Could not close input stream after loading image in media view: " + fileName, ex);
logger.log(Level.WARNING, "Could not close input stream after loading image in media view: " + fileName, ex); //NON-NLS
}
}
if (fxImage == null || fxImage.isError()) {
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName);
logger.log(Level.WARNING, "Could not load image file into media view: " + fileName); //NON-NLS
return;
}

View File

@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.corecomponents;
import java.awt.Dimension;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPanel;
@ -34,10 +35,10 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
// 64 bit architectures
private static final String[] ARCH64 = new String[]{"amd64", "x86_64"};
private static final String[] ARCH64 = new String[]{"amd64", "x86_64"}; //NON-NLS NON-NLS
// 32 bit architectures
private static final String[] ARCH32 = new String[]{"x86"};
private static final String[] ARCH32 = new String[]{"x86"}; //NON-NLS
/**
* Factory Method to create a MediaViewVideoPanel.
@ -48,10 +49,10 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
*/
public static MediaViewVideoPanel createVideoPanel() {
if (is64BitJVM()) {
logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player.");
logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player."); //NON-NLS
return getFXImpl();
} else {
logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player.");
logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player."); //NON-NLS
return getGstImpl();
}
}
@ -108,4 +109,8 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
* Return the extensions supported by this video panel.
*/
abstract public String[] getExtensions();
/**
* Return the MimeTypes supported by this video panel.
*/
abstract public List<String> getMimeTypes();
}

View File

@ -167,7 +167,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
int to = from + showImages - 1;
setDisplayName(from + "-" + to);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
}
}

View File

@ -90,7 +90,7 @@ public class AutopsyExceptionHandler extends Handler {
}
});
}
logger.log(Level.SEVERE, "Unexpected error: " + title + ", " + message );
logger.log(Level.SEVERE, "Unexpected error: " + title + ", " + message ); //NON-NLS
} else {
// Throwable (unanticipated) error. Use built-in exception handler to offer details, stacktrace.
nbErrorManager.publish(record);
@ -118,7 +118,7 @@ public class AutopsyExceptionHandler extends Handler {
private String formatExplanation(LogRecord record) {
final String logMessage = getFormatter().formatMessage(record);
String explanation = record.getThrown().getMessage();
String causeMessage = (explanation != null) ? "\nCaused by: " + explanation : "";
String causeMessage = (explanation != null) ? "\nCaused by: " + explanation : ""; //NON-NLS
return logMessage + causeMessage;
}
@ -149,11 +149,11 @@ public class AutopsyExceptionHandler extends Handler {
private static String getTitleForLevelValue(int levelValue) {
if (levelValue >= SEVERE_VALUE) {
return "Error";
return "Error"; //NON-NLS
} else if (levelValue >= WARNING_VALUE) {
return "Warning";
return "Warning"; //NON-NLS
} else {
return "Message";
return "Message"; //NON-NLS
}
}

View File

@ -39,9 +39,9 @@ public class EscapeUtil {
*/
public static String decodeURL(String url) {
try {
return URLDecoder.decode(url, "UTF-8");
return URLDecoder.decode(url, "UTF-8"); //NON-NLS
} catch (UnsupportedEncodingException ex) {
logger.log(Level.SEVERE, "Could not decode URL " + url, ex);
logger.log(Level.SEVERE, "Could not decode URL " + url, ex); //NON-NLS
//should not happen
return "";
}
@ -55,9 +55,9 @@ public class EscapeUtil {
*/
public static String encodeURL(String url) {
try {
return URLEncoder.encode(url, "UTF-8");
return URLEncoder.encode(url, "UTF-8"); //NON-NLS
} catch (UnsupportedEncodingException ex) {
logger.log(Level.SEVERE, "Could not encode URL " + url, ex);
logger.log(Level.SEVERE, "Could not encode URL " + url, ex); //NON-NLS
//should not happen
return "";
}

View File

@ -64,14 +64,14 @@ import org.sleuthkit.autopsy.coreutils.Logger;
}
final Runtime rt = Runtime.getRuntime();
logger.log(Level.INFO, "Executing " + arrayCommandToLog.toString());
logger.log(Level.INFO, "Executing " + arrayCommandToLog.toString()); //NON-NLS
proc = rt.exec(arrayCommand);
//stderr redirect
errorStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getErrorStream(), "ERROR");
errorStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getErrorStream(), "ERROR"); //NON-NLS
//stdout redirect
outputStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getInputStream(), "OUTPUT");
outputStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getInputStream(), "OUTPUT"); //NON-NLS
//start redurectors
errorStringRedirect.start();
@ -79,7 +79,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
//wait for process to complete and capture error core
final int exitVal = proc.waitFor();
logger.log(Level.INFO, aCommand + " exit value: " + exitVal);
logger.log(Level.INFO, aCommand + " exit value: " + exitVal); //NON-NLS
errorStringRedirect.stopRun();
errorStringRedirect = null;
@ -119,12 +119,12 @@ import org.sleuthkit.autopsy.coreutils.Logger;
}
final Runtime rt = Runtime.getRuntime();
logger.log(Level.INFO, "Executing " + arrayCommandToLog.toString());
logger.log(Level.INFO, "Executing " + arrayCommandToLog.toString()); //NON-NLS
proc = rt.exec(arrayCommand);
//stderr redirect
errorStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getErrorStream(), "ERROR");
errorStringRedirect = new ExecUtil.StreamToStringRedirect(proc.getErrorStream(), "ERROR"); //NON-NLS
//stdout redirect
outputWriterRedirect = new ExecUtil.StreamToWriterRedirect(proc.getInputStream(), stdoutWriter);
@ -134,7 +134,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
//wait for process to complete and capture error core
final int exitVal = proc.waitFor();
logger.log(Level.INFO, aCommand + " exit value: " + exitVal);
logger.log(Level.INFO, aCommand + " exit value: " + exitVal); //NON-NLS
//gc process with its streams
//proc = null;
@ -144,7 +144,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
* Interrupt the running process and stop its stream redirect threads
*/
public synchronized void stop() {
logger.log(Level.INFO, "Stopping Execution of: " + command);
logger.log(Level.INFO, "Stopping Execution of: " + command); //NON-NLS
if (errorStringRedirect != null) {
errorStringRedirect.stopRun();
@ -204,13 +204,13 @@ import org.sleuthkit.autopsy.coreutils.Logger;
this.output.append(line).append(SEP);
}
} catch (final IOException ex) {
logger.log(Level.WARNING, "Error redirecting stream to string buffer", ex);
logger.log(Level.WARNING, "Error redirecting stream to string buffer", ex); //NON-NLS
} finally {
if (br != null) {
try {
br.close();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Error closing stream reader", ex);
logger.log(Level.SEVERE, "Error closing stream reader", ex); //NON-NLS
}
}
}
@ -275,7 +275,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
writer.append(line).append(SEP);
}
} catch (final IOException ex) {
logger.log(Level.SEVERE, "Error reading output and writing to file writer", ex);
logger.log(Level.SEVERE, "Error reading output and writing to file writer", ex); //NON-NLS
} finally {
try {
if (doRun) {
@ -286,7 +286,7 @@ import org.sleuthkit.autopsy.coreutils.Logger;
}
} catch (IOException ex) {
logger.log(Level.SEVERE, "Error flushing file writer", ex);
logger.log(Level.SEVERE, "Error flushing file writer", ex); //NON-NLS
}
}
}

View File

@ -64,13 +64,13 @@ import org.openide.filesystems.FileObject;
if (path.isFile()) { // If it's a file
if (!path.delete()) {
sucess = false;
logger.log(Level.WARNING, "Failed to delete file {0}", path.getPath());
logger.log(Level.WARNING, "Failed to delete file {0}", path.getPath()); //NON-NLS
}
} else { // If it's a directory
if (path.list().length == 0) { // If the dir is empty
if (!path.delete()) {
sucess = false;
logger.log(Level.WARNING, "Failed to delete the empty directory at {0}", path.getPath());
logger.log(Level.WARNING, "Failed to delete the empty directory at {0}", path.getPath()); //NON-NLS
}
} else {
String files[] = path.list();
@ -81,11 +81,11 @@ import org.openide.filesystems.FileObject;
if (path.list().length == 0) { // Delete the newly-empty dir
if (!path.delete()) {
sucess = false;
logger.log(Level.WARNING, "Failed to delete the empty directory at {0}", path.getPath());
logger.log(Level.WARNING, "Failed to delete the empty directory at {0}", path.getPath()); //NON-NLS
}
} else {
sucess = false;
logger.log(Level.WARNING, "Directory {0} did not recursivly delete sucessfully.", path.getPath());
logger.log(Level.WARNING, "Directory {0} did not recursivly delete sucessfully.", path.getPath()); //NON-NLS
}
}
}

View File

@ -53,7 +53,7 @@ public class ImageUtils {
public static final int ICON_SIZE_MEDIUM = 100;
public static final int ICON_SIZE_LARGE = 200;
private static final Logger logger = Logger.getLogger(ImageUtils.class.getName());
private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage();
private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage(); //NON-NLS
private static final List<String> SUPP_EXTENSIONS = Arrays.asList(ImageIO.getReaderFileSuffixes());
private static final List<String> SUPP_MIME_TYPES = Arrays.asList(ImageIO.getReaderMIMETypes());
/**
@ -90,7 +90,7 @@ public class ImageUtils {
}
}
catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error while getting file signature from blackboard.", ex);
logger.log(Level.WARNING, "Error while getting file signature from blackboard.", ex); //NON-NLS
}
final String extension = f.getNameExtension();
@ -130,7 +130,7 @@ public class ImageUtils {
icon = bicon;
}
} catch (IOException ex) {
logger.log(Level.WARNING, "Error while reading image.", ex);
logger.log(Level.WARNING, "Error while reading image.", ex); //NON-NLS
icon = DEFAULT_ICON;
}
} else { // Make a new icon
@ -208,10 +208,10 @@ public class ImageUtils {
if (f.exists()) {
f.delete();
}
ImageIO.write((BufferedImage) icon, "png", getFile(content.getId()));
ImageIO.write((BufferedImage) icon, "png", getFile(content.getId())); //NON-NLS
}
} catch (IOException ex) {
logger.log(Level.WARNING, "Could not write cache thumbnail: " + content, ex);
logger.log(Level.WARNING, "Could not write cache thumbnail: " + content, ex); //NON-NLS
}
return icon;
}
@ -226,24 +226,24 @@ public class ImageUtils {
inputStream = new ReadContentInputStream(content);
BufferedImage bi = ImageIO.read(inputStream);
if (bi == null) {
logger.log(Level.WARNING, "No image reader for file: " + content.getName());
logger.log(Level.WARNING, "No image reader for file: " + content.getName()); //NON-NLS
return null;
}
BufferedImage biScaled = ScalrWrapper.resizeFast(bi, iconSize);
return biScaled;
} catch (OutOfMemoryError e) {
logger.log(Level.WARNING, "Could not scale image (too large): " + content.getName(), e);
logger.log(Level.WARNING, "Could not scale image (too large): " + content.getName(), e); //NON-NLS
return null;
} catch (Exception e) {
logger.log(Level.WARNING, "Could not scale image: " + content.getName(), e);
logger.log(Level.WARNING, "Could not scale image: " + content.getName(), e); //NON-NLS
return null;
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException ex) {
logger.log(Level.WARNING, "Could not close input stream after resizing thumbnail: " + content.getName(), ex);
logger.log(Level.WARNING, "Could not close input stream after resizing thumbnail: " + content.getName(), ex); //NON-NLS
}
}

View File

@ -45,20 +45,20 @@ public class Installer extends ModuleInstall {
@Override
public void restored() {
autopsyLogger.log(Level.INFO, "Default charset: " + PlatformUtil.getDefaultPlatformCharset());
autopsyLogger.log(Level.INFO, "Default file encoding: " + PlatformUtil.getDefaultPlatformFileEncoding());
autopsyLogger.log(Level.INFO, "Default charset: " + PlatformUtil.getDefaultPlatformCharset()); //NON-NLS
autopsyLogger.log(Level.INFO, "Default file encoding: " + PlatformUtil.getDefaultPlatformFileEncoding()); //NON-NLS
autopsyLogger.log(Level.INFO, "Java runtime version: " + Version.getJavaRuntimeVersion());
autopsyLogger.log(Level.INFO, "Java runtime version: " + Version.getJavaRuntimeVersion()); //NON-NLS
autopsyLogger.log(Level.INFO, "Netbeans Platform build: " + Version.getNetbeansBuild());
autopsyLogger.log(Level.INFO, "Netbeans Platform build: " + Version.getNetbeansBuild()); //NON-NLS
autopsyLogger.log(Level.INFO, "Application name: " + Version.getName()
+ ", version: " + Version.getVersion() + ", build: " + Version.getBuildType());
autopsyLogger.log(Level.INFO, "Application name: " + Version.getName() //NON-NLS
+ ", version: " + Version.getVersion() + ", build: " + Version.getBuildType()); //NON-NLS NON-NLS
autopsyLogger.log(Level.INFO, "os.name: " + System.getProperty("os.name"));
autopsyLogger.log(Level.INFO, "os.arch: " + System.getProperty("os.arch"));
autopsyLogger.log(Level.INFO, "PID: " + PlatformUtil.getPID());
autopsyLogger.log(Level.INFO, "Process Virtual Memory Used: " + PlatformUtil.getProcessVirtualMemoryUsed());
autopsyLogger.log(Level.INFO, "os.name: " + System.getProperty("os.name")); //NON-NLS
autopsyLogger.log(Level.INFO, "os.arch: " + System.getProperty("os.arch")); //NON-NLS
autopsyLogger.log(Level.INFO, "PID: " + PlatformUtil.getPID()); //NON-NLS
autopsyLogger.log(Level.INFO, "Process Virtual Memory Used: " + PlatformUtil.getProcessVirtualMemoryUsed()); //NON-NLS

View File

@ -48,7 +48,7 @@ import org.sleuthkit.autopsy.coreutils.LnkEnums.NetworkProviderType;
try {
is.read(content);
} catch (IOException ex) {
Logger.getLogger(JLnkParser.class.getName()).log(Level.WARNING, "Error reading input stream", ex);
Logger.getLogger(JLnkParser.class.getName()).log(Level.WARNING, "Error reading input stream", ex); //NON-NLS
}
}
@ -226,7 +226,7 @@ import org.sleuthkit.autopsy.coreutils.LnkEnums.NetworkProviderType;
try {
return new String(theString, "UTF-16LE");
} catch (UnsupportedEncodingException ex) {
logger.info("Shouldn't happen");
logger.info("Shouldn't happen"); //NON-NLS
return null;
}
}

View File

@ -47,11 +47,11 @@ public class LocalDisk {
public String getReadableSize() {
int unit = 1024;
if (size < unit) {
return size + " B";
return size + " B"; //NON-NLS
}
int exp = (int) (Math.log(size) / Math.log(unit));
String pre = "KMGTPE".charAt(exp-1) + "";
return String.format("%.1f %sB", size / Math.pow(unit, exp), pre);
String pre = "KMGTPE".charAt(exp-1) + ""; //NON-NLS
return String.format("%.1f %sB", size / Math.pow(unit, exp), pre); //NON-NLS
}
@Override

View File

@ -56,16 +56,16 @@ public class Logger extends java.util.logging.Logger {
/**
* Main messages log file name
*/
public static final String messagesLog = "autopsy.log";
public static final String messagesLog = "autopsy.log"; //NON-NLS
/**
* Detailed exception trace log file name
*/
public static final String tracesLog = "autopsy_traces.log";
public static final String tracesLog = "autopsy_traces.log"; //NON-NLS
/**
* Action logger file name
*/
public static final String actionsLog = "autopsy_actions.log";
public static final String actionsLog = "autopsy_actions.log"; //NON-NLS
/**
* Static blocks to get around compile errors such as "variable might not
@ -82,7 +82,7 @@ public class Logger extends java.util.logging.Logger {
f.setFormatter(new SimpleFormatter());
return f;
} catch (IOException e) {
throw new RuntimeException("Error initializing traces logger", e);
throw new RuntimeException("Error initializing traces logger", e); //NON-NLS
}
}
@ -93,7 +93,7 @@ public class Logger extends java.util.logging.Logger {
f.setFormatter(new SimpleFormatter());
return f;
} catch (IOException e) {
throw new RuntimeException("Error initializing normal logger", e);
throw new RuntimeException("Error initializing normal logger", e); //NON-NLS
}
}
@ -102,13 +102,13 @@ public class Logger extends java.util.logging.Logger {
FileHandler f = new FileHandler(LOG_DIR + actionsLog, LOG_SIZE, LOG_FILE_COUNT);
f.setEncoding(LOG_ENCODING);
f.setFormatter(new SimpleFormatter());
java.util.logging.Logger _actionsLogger = java.util.logging.Logger.getLogger("Actions");
java.util.logging.Logger _actionsLogger = java.util.logging.Logger.getLogger("Actions"); //NON-NLS
_actionsLogger.setUseParentHandlers(false);
_actionsLogger.addHandler(f);
_actionsLogger.addHandler(console);
return _actionsLogger;
} catch (IOException e) {
throw new RuntimeException("Error initializing actions logger", e);
throw new RuntimeException("Error initializing actions logger", e); //NON-NLS
}
}
@ -133,7 +133,7 @@ public class Logger extends java.util.logging.Logger {
* @param actionClass class where user triggered action occurs
*/
public static void noteAction(Class<?> actionClass) {
actionsLogger.log(Level.INFO, "Action performed: {0}", actionClass.getName());
actionsLogger.log(Level.INFO, "Action performed: {0}", actionClass.getName()); //NON-NLS
}
/**
@ -164,7 +164,7 @@ public class Logger extends java.util.logging.Logger {
@Override
public void log(Level level, String message, Throwable thrown) {
super.log(level, message + "\nException: " + thrown.toString());
super.log(level, message + "\nException: " + thrown.toString()); //NON-NLS
removeHandler(normal);
super.log(level, message, thrown);
addHandler(normal);

View File

@ -49,9 +49,9 @@ public class MessageNotifyUtil {
public enum MessageType {
INFO(NotifyDescriptor.INFORMATION_MESSAGE, "info-icon-16.png"),
ERROR(NotifyDescriptor.ERROR_MESSAGE, "error-icon-16.png"),
WARNING(NotifyDescriptor.WARNING_MESSAGE, "warning-icon-16.png");
INFO(NotifyDescriptor.INFORMATION_MESSAGE, "info-icon-16.png"), //NON-NLS
ERROR(NotifyDescriptor.ERROR_MESSAGE, "error-icon-16.png"), //NON-NLS
WARNING(NotifyDescriptor.WARNING_MESSAGE, "warning-icon-16.png"); //NON-NLS
private int notifyDescriptorType;
private Icon icon;
@ -65,10 +65,10 @@ public class MessageNotifyUtil {
}
private static Icon loadIcon(String resourceName) {
Icon icon = ImageUtilities.loadImageIcon("org/sleuthkit/autopsy/images/" + resourceName, false);
Icon icon = ImageUtilities.loadImageIcon("org/sleuthkit/autopsy/images/" + resourceName, false); //NON-NLS
if (icon == null) {
Logger logger = Logger.getLogger(org.sleuthkit.autopsy.coreutils.MessageNotifyUtil.MessageType.class.getName());
logger.log(Level.SEVERE, "Failed to load icon resource: " + resourceName + ". Using blank image.");
logger.log(Level.SEVERE, "Failed to load icon resource: " + resourceName + ". Using blank image."); //NON-NLS NON-NLS
icon = new ImageIcon();
}
return icon;

View File

@ -38,8 +38,8 @@ public class ModuleSettings {
// The directory where the properties file is located
private final static String moduleDirPath = PlatformUtil.getUserConfigDirectory();
public static final String DEFAULT_CONTEXT = "GeneralContext";
public static final String MAIN_SETTINGS = "Case";
public static final String DEFAULT_CONTEXT = "GeneralContext"; //NON-NLS
public static final String MAIN_SETTINGS = "Case"; //NON-NLS
/** the constructor */
private ModuleSettings() {}
@ -64,7 +64,7 @@ public class ModuleSettings {
fos.close();
}
catch(IOException e){
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Was not able to create a new properties file.", e);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Was not able to create a new properties file.", e); //NON-NLS
return false;
}
return true;
@ -104,7 +104,7 @@ public class ModuleSettings {
*/
private static String getPropertyPath(String moduleName){
if(configExists(moduleName)){
return moduleDirPath + File.separator + moduleName + ".properties";
return moduleDirPath + File.separator + moduleName + ".properties"; //NON-NLS
}
return null;
@ -120,7 +120,7 @@ public class ModuleSettings {
public static String getConfigSetting(String moduleName, String settingName) {
if (!configExists(moduleName)) {
makeConfigFile(moduleName);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]");
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]"); //NON-NLS NON-NLS
}
try {
@ -128,7 +128,7 @@ public class ModuleSettings {
return props.getProperty(settingName);
} catch (IOException e) {
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Could not read config file [" + moduleName + "]", e);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Could not read config file [" + moduleName + "]", e); //NON-NLS
return null;
}
@ -145,7 +145,7 @@ public class ModuleSettings {
if (!configExists(moduleName)) {
makeConfigFile(moduleName);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]");
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]"); //NON-NLS NON-NLS
}
try {
Properties props = fetchProperties(moduleName);
@ -159,7 +159,7 @@ public class ModuleSettings {
return map;
} catch (IOException e) {
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Could not read config file [" + moduleName + "]", e);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Could not read config file [" + moduleName + "]", e); //NON-NLS
return null;
}
}
@ -172,7 +172,7 @@ public class ModuleSettings {
public static synchronized void setConfigSettings(String moduleName, Map<String, String> settings) {
if (!configExists(moduleName)) {
makeConfigFile(moduleName);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]");
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]"); //NON-NLS NON-NLS
}
try {
Properties props = fetchProperties(moduleName);
@ -183,10 +183,10 @@ public class ModuleSettings {
File path = new File(getPropertyPath(moduleName));
FileOutputStream fos = new FileOutputStream(path);
props.store(fos, "Changed config settings(batch)");
props.store(fos, "Changed config settings(batch)"); //NON-NLS
fos.close();
} catch (IOException e) {
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Property file exists for [" + moduleName + "] at [" + getPropertyPath(moduleName) + "] but could not be loaded.", e);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Property file exists for [" + moduleName + "] at [" + getPropertyPath(moduleName) + "] but could not be loaded.", e); //NON-NLS NON-NLS NON-NLS
}
}
@ -199,7 +199,7 @@ public class ModuleSettings {
public static synchronized void setConfigSetting(String moduleName, String settingName, String settingVal) {
if (!configExists(moduleName)) {
makeConfigFile(moduleName);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]");
Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".properties]"); //NON-NLS NON-NLS
}
try {
@ -209,10 +209,10 @@ public class ModuleSettings {
File path = new File(getPropertyPath(moduleName));
FileOutputStream fos = new FileOutputStream(path);
props.store(fos, "Changed config settings(single)");
props.store(fos, "Changed config settings(single)"); //NON-NLS
fos.close();
} catch (IOException e) {
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Property file exists for [" + moduleName + "] at [" + getPropertyPath(moduleName) + "] but could not be loaded.", e);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Property file exists for [" + moduleName + "] at [" + getPropertyPath(moduleName) + "] but could not be loaded.", e); //NON-NLS NON-NLS NON-NLS
}
}
@ -229,12 +229,12 @@ public class ModuleSettings {
props.remove(key);
File path = new File(getPropertyPath(moduleName));
FileOutputStream fos = new FileOutputStream(path);
props.store(fos, "Removed " + key);
props.store(fos, "Removed " + key); //NON-NLS
fos.close();
}
}
catch(IOException e ){
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Could not remove property from file, file not found", e);
Logger.getLogger(ModuleSettings.class.getName()).log(Level.WARNING, "Could not remove property from file, file not found", e); //NON-NLS
}
}

View File

@ -61,7 +61,7 @@ public class PlatformUtil {
* @return absolute path string to the install root dir
*/
public static String getInstallPath() {
File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false);
File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false); //NON-NLS
File rootPath = coreFolder.getParentFile().getParentFile();
return rootPath.getAbsolutePath();
}
@ -73,7 +73,7 @@ public class PlatformUtil {
* not found
*/
public static String getInstallModulesPath() {
File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false);
File coreFolder = InstalledFileLocator.getDefault().locate("core", PlatformUtil.class.getPackage().getName(), false); //NON-NLS
File rootPath = coreFolder.getParentFile();
String modulesPath = rootPath.getAbsolutePath() + File.separator + "modules";
@ -122,10 +122,10 @@ public class PlatformUtil {
NbBundle.getMessage(PlatformUtil.class,
"PlatformUtil.jrePath.jreDir.msg",
jrePath.getAbsolutePath()));
javaPath = jrePath.getAbsolutePath() + File.separator + "bin" + File.separator + "java";
javaPath = jrePath.getAbsolutePath() + File.separator + "bin" + File.separator + "java"; //NON-NLS
} else {
//else use system installed java in PATH env variable
javaPath = "java";
javaPath = "java"; //NON-NLS
}
@ -172,7 +172,7 @@ public class PlatformUtil {
* @return Get user config directory path string
*/
public static String getUserConfigDirectory() {
return Places.getUserDirectory() + File.separator + "config";
return Places.getUserDirectory() + File.separator + "config"; //NON-NLS
}
/**
@ -182,7 +182,7 @@ public class PlatformUtil {
*/
public static String getLogDirectory() {
return Places.getUserDirectory().getAbsolutePath() + File.separator
+ "var" + File.separator + "log" + File.separator;
+ "var" + File.separator + "log" + File.separator; //NON-NLS
}
public static String getDefaultPlatformFileEncoding() {
@ -247,7 +247,7 @@ public class PlatformUtil {
* @return OS name string
*/
public static String getOSName() {
return System.getProperty("os.name", OS_NAME_UNKNOWN);
return System.getProperty("os.name", OS_NAME_UNKNOWN); //NON-NLS
}
/**
@ -256,7 +256,7 @@ public class PlatformUtil {
* @return OS version string
*/
public static String getOSVersion() {
return System.getProperty("os.version", OS_VERSION_UNKNOWN);
return System.getProperty("os.version", OS_VERSION_UNKNOWN); //NON-NLS
}
/**
@ -265,7 +265,7 @@ public class PlatformUtil {
* @return OS arch string
*/
public static String getOSArch() {
return System.getProperty("os.arch", OS_ARCH_UNKNOWN);
return System.getProperty("os.arch", OS_ARCH_UNKNOWN); //NON-NLS
}
/**
@ -274,7 +274,7 @@ public class PlatformUtil {
* @return true if running on Windows OS
*/
public static boolean isWindowsOS() {
return PlatformUtil.getOSName().toLowerCase().contains("windows");
return PlatformUtil.getOSName().toLowerCase().contains("windows"); //NON-NLS
}
/**
@ -304,10 +304,10 @@ public class PlatformUtil {
int n = 0;
int breakCount = 0;
while (true) {
String path = "\\\\.\\PhysicalDrive" + n;
String path = "\\\\.\\PhysicalDrive" + n; //NON-NLS
if (canReadDrive(path)) {
try {
drives.add(new LocalDisk("Drive " + n, path, SleuthkitJNI.findDeviceSize(path)));
drives.add(new LocalDisk("Drive " + n, path, SleuthkitJNI.findDeviceSize(path))); //NON-NLS
} catch (TskCoreException ex) {
// Don't add the drive because we can't read the size
}
@ -326,8 +326,8 @@ public class PlatformUtil {
File[] files = dev.listFiles();
for (File f : files) {
String name = f.getName();
if ((name.contains("hd") || name.contains("sd")) && f.canRead() && name.length() == 3) {
String path = "/dev/" + name;
if ((name.contains("hd") || name.contains("sd")) && f.canRead() && name.length() == 3) { //NON-NLS
String path = "/dev/" + name; //NON-NLS
if (canReadDrive(path)) {
try {
drives.add(new LocalDisk(path, path, SleuthkitJNI.findDeviceSize(path)));
@ -369,8 +369,8 @@ public class PlatformUtil {
File[] files = dev.listFiles();
for (File f : files) {
String name = f.getName();
if ((name.contains("hd") || name.contains("sd")) && f.canRead() && name.length() == 4) {
String path = "/dev/" + name;
if ((name.contains("hd") || name.contains("sd")) && f.canRead() && name.length() == 4) { //NON-NLS
String path = "/dev/" + name; //NON-NLS
if (canReadDrive(path)) {
drives.add(new LocalDisk(path, path, f.getTotalSpace()));
}
@ -451,7 +451,7 @@ public class PlatformUtil {
*/
public static synchronized long getJavaPID(String sigarSubQuery) {
long jpid = -1;
final String sigarQuery = "State.Name.sw=java," + sigarSubQuery;
final String sigarQuery = "State.Name.sw=java," + sigarSubQuery; //NON-NLS
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();
@ -482,7 +482,7 @@ public class PlatformUtil {
*/
public static synchronized long[] getJavaPIDs(String sigarSubQuery) {
long[] jpids = null;
final String sigarQuery = "State.Name.sw=java," + sigarSubQuery;
final String sigarQuery = "State.Name.sw=java," + sigarSubQuery; //NON-NLS
try {
if (sigar == null) {
sigar = org.sleuthkit.autopsy.corelibs.SigarLoader.getSigar();

View File

@ -686,18 +686,18 @@ public class StringExtract {
LATIN_1 {
@Override
public String toString() {
return "Latin - Basic";
return "Latin - Basic"; //NON-NLS
}
@Override
public String getLanguages() {
return "English";
return "English"; //NON-NLS
}
},
GREEK {
@Override
public String toString() {
return "Greek";
return "Greek"; //NON-NLS
}
@Override
@ -708,18 +708,18 @@ public class StringExtract {
CYRILLIC {
@Override
public String toString() {
return "Cyrillic";
return "Cyrillic"; //NON-NLS
}
@Override
public String getLanguages() {
return "Russian, Bulgarian, Serbian, Moldovan";
return "Russian, Bulgarian, Serbian, Moldovan"; //NON-NLS
}
},
ARMENIAN {
@Override
public String toString() {
return "Armenian";
return "Armenian"; //NON-NLS
}
@Override
@ -730,7 +730,7 @@ public class StringExtract {
HEBREW {
@Override
public String toString() {
return "Hebrew";
return "Hebrew"; //NON-NLS
}
@Override
@ -741,7 +741,7 @@ public class StringExtract {
ARABIC {
@Override
public String toString() {
return "Arabic";
return "Arabic"; //NON-NLS
}
@Override
@ -770,7 +770,7 @@ public class StringExtract {
BENGALI {
@Override
public String toString() {
return "Bengali";
return "Bengali"; //NON-NLS
}
@Override
@ -829,7 +829,7 @@ public class StringExtract {
THAI {
@Override
public String toString() {
return "Thai";
return "Thai"; //NON-NLS
}
@Override
@ -840,7 +840,7 @@ public class StringExtract {
LAO {
@Override
public String toString() {
return "Laotian";
return "Laotian"; //NON-NLS
}
@Override
@ -851,7 +851,7 @@ public class StringExtract {
TIBETAN {
@Override
public String toString() {
return "Tibetian";
return "Tibetian"; //NON-NLS
}
@Override
@ -868,7 +868,7 @@ public class StringExtract {
GEORGIAN {
@Override
public String toString() {
return "Georgian";
return "Georgian"; //NON-NLS
}
@Override
@ -879,18 +879,18 @@ public class StringExtract {
HANGUL {
@Override
public String toString() {
return "Hangul";
return "Hangul"; //NON-NLS
}
@Override
public String getLanguages() {
return "Korean";
return "Korean"; //NON-NLS
}
},
ETHIOPIC {
@Override
public String toString() {
return "Ethiopic";
return "Ethiopic"; //NON-NLS
}
@Override
@ -925,18 +925,18 @@ public class StringExtract {
KHMER {
@Override
public String toString() {
return "Khmer";
return "Khmer"; //NON-NLS
}
@Override
public String getLanguages() {
return "Cambodian";
return "Cambodian"; //NON-NLS
}
},
MONGOLIAN {
@Override
public String toString() {
return "Mongolian";
return "Mongolian"; //NON-NLS
}
@Override
@ -947,23 +947,23 @@ public class StringExtract {
HIRAGANA {
@Override
public String toString() {
return "Hiragana";
return "Hiragana"; //NON-NLS
}
@Override
public String getLanguages() {
return "Japanese";
return "Japanese"; //NON-NLS
}
},
KATAKANA {
@Override
public String toString() {
return "Katakana";
return "Katakana"; //NON-NLS
}
@Override
public String getLanguages() {
return "Japanese";
return "Japanese"; //NON-NLS
}
},
BOPOMOFO {
@ -975,12 +975,12 @@ public class StringExtract {
HAN {
@Override
public String toString() {
return "Han";
return "Han"; //NON-NLS
}
@Override
public String getLanguages() {
return "Chinese, Japanese, Korean";
return "Chinese, Japanese, Korean"; //NON-NLS
}
},
YI {
@ -1172,17 +1172,17 @@ public class StringExtract {
LATIN_2 {
@Override
public String toString() {
return "Latin - Extended";
return "Latin - Extended"; //NON-NLS
}
@Override
public String getLanguages() {
return "European";
return "European"; //NON-NLS
}
}
};
private static final SCRIPT[] SCRIPT_VALUES = SCRIPT.values();
private static final String PROPERTY_FILE = "StringExtract.properties";
private static final String PROPERTY_FILE = "StringExtract.properties"; //NON-NLS
/**
* table has an entry for every possible 2-byte value
*/
@ -1268,7 +1268,7 @@ public class StringExtract {
int toks = st.countTokens();
//logger.log(Level.INFO, "TABLE TOKS: " + toks);
if (toks != UNICODE_TABLE_SIZE) {
logger.log(Level.WARNING, "Unicode table corrupt, expecting: " + UNICODE_TABLE_SIZE, ", have: " + toks);
logger.log(Level.WARNING, "Unicode table corrupt, expecting: " + UNICODE_TABLE_SIZE, ", have: " + toks); //NON-NLS
return false;
}
@ -1279,10 +1279,10 @@ public class StringExtract {
unicodeTable[tableIndex++] = code;
}
logger.log(Level.INFO, "initialized, unicode table loaded");
logger.log(Level.INFO, "initialized, unicode table loaded"); //NON-NLS
} catch (IOException ex) {
logger.log(Level.WARNING, "Could not load" + PROPERTY_FILE);
logger.log(Level.WARNING, "Could not load" + PROPERTY_FILE); //NON-NLS
return false;
}

View File

@ -35,7 +35,7 @@ import java.util.logging.Level;
@Override
public void actionPerformed(ActionEvent e) {
logger.log(Level.WARNING, "Testing log!", new Exception(new Exception(new Exception(new Exception("original reason with asdfasdfasdfasdfasd fasdfasdfasdf sdfasdfasdfa asdfasdf asdfa sdfas ", new Exception("more original reason"))))));
logger.log(Level.WARNING, "Testing log!", new Exception(new Exception(new Exception(new Exception("original reason with asdfasdfasdfasdfasd fasdfasdfasdf sdfasdfasdfa asdfasdf asdfa sdfas ", new Exception("more original reason")))))); //NON-NLS
//throw new RuntimeException("othe");
//logger.log(Level.WARNING, "Testing log!");

View File

@ -44,7 +44,7 @@ public class Version {
versionProperties = new Properties();
try {
InputStream inputStream = Version.class.getResourceAsStream("Version.properties");
InputStream inputStream = Version.class.getResourceAsStream("Version.properties"); //NON-NLS
versionProperties.load(inputStream);
} catch (IOException e) {
versionProperties = null;

View File

@ -81,12 +81,12 @@ public class XMLUtil {
return true;
}
catch(SAXException e){
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to validate XML file.", e);
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to validate XML file.", e); //NON-NLS
return false;
}
}
catch(IOException e){
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to load XML file [" + xmlfile.toString() + "] of type ["+schemaFile+"]", e);
Logger.getLogger(clazz.getName()).log(Level.WARNING, "Unable to load XML file [" + xmlfile.toString() + "] of type ["+schemaFile+"]", e); //NON-NLS
return false;
}
}
@ -128,18 +128,18 @@ public class XMLUtil {
ret = builder.parse(
new FileInputStream(xmlPath));
} catch (ParserConfigurationException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't initialize parser.", e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't initialize parser.", e); //NON-NLS
} catch (SAXException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't parse XML.", e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't parse XML.", e); //NON-NLS
} catch (IOException e) {
//error reading file
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't read file.", e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: can't read file.", e); //NON-NLS
}
if (!XMLUtil.xmlIsValid(ret, clazz, xsdPath)) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: could not validate against [" + xsdPath + "], results may not be accurate");
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error loading XML file: could not validate against [" + xsdPath + "], results may not be accurate"); //NON-NLS
}
return ret;
@ -156,14 +156,14 @@ public class XMLUtil {
*/
public static <T> boolean saveDoc(Class<T> clazz, String xmlPath, String encoding, final Document doc) {
TransformerFactory xf = TransformerFactory.newInstance();
xf.setAttribute("indent-number", new Integer(1));
xf.setAttribute("indent-number", new Integer(1)); //NON-NLS
boolean success = false;
try {
Transformer xformer = xf.newTransformer();
xformer.setOutputProperty(OutputKeys.METHOD, "xml");
xformer.setOutputProperty(OutputKeys.INDENT, "yes");
xformer.setOutputProperty(OutputKeys.METHOD, "xml"); //NON-NLS
xformer.setOutputProperty(OutputKeys.INDENT, "yes"); //NON-NLS
xformer.setOutputProperty(OutputKeys.ENCODING, encoding);
xformer.setOutputProperty(OutputKeys.STANDALONE, "yes");
xformer.setOutputProperty(OutputKeys.STANDALONE, "yes"); //NON-NLS
xformer.setOutputProperty(OutputKeys.VERSION, "1.0");
File file = new File(xmlPath);
FileOutputStream stream = new FileOutputStream(file);
@ -174,15 +174,15 @@ public class XMLUtil {
success = true;
} catch (UnsupportedEncodingException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Should not happen", e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Should not happen", e); //NON-NLS
} catch (TransformerConfigurationException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file", e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file", e); //NON-NLS
} catch (TransformerException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file", e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file", e); //NON-NLS
} catch (FileNotFoundException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file: cannot write to file: " + xmlPath, e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file: cannot write to file: " + xmlPath, e); //NON-NLS
} catch (IOException e) {
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file: cannot write to file: " + xmlPath, e);
Logger.getLogger(clazz.getName()).log(Level.SEVERE, "Error writing XML file: cannot write to file: " + xmlPath, e); //NON-NLS
}
return success;
}

View File

@ -189,7 +189,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
try {
path = content.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Except while calling Content.getUniquePath() on {0}", content);
logger.log(Level.SEVERE, "Except while calling Content.getUniquePath() on {0}", content); //NON-NLS
}
map.put(AbstractFilePropertyType.NAME.toString(), AbstractAbstractFileNode.getContentDisplayName(content));
@ -252,23 +252,23 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
// }
// }
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id "
+ "FROM blackboard_attributes,blackboard_artifacts WHERE "
+ "attribute_type_id=" + setNameId
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id"
+ " AND blackboard_artifacts.artifact_type_id=" + artId
+ " AND blackboard_artifacts.obj_id=" + objId;
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id " //NON-NLS
+ "FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
+ "attribute_type_id=" + setNameId //NON-NLS
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
+ " AND blackboard_artifacts.artifact_type_id=" + artId //NON-NLS
+ " AND blackboard_artifacts.obj_id=" + objId; //NON-NLS
rs = skCase.runQuery(query);
int i = 0;
while (rs.next()) {
if (i++ > 0) {
strList += ", ";
}
strList += rs.getString("value_text");
strList += rs.getString("value_text"); //NON-NLS
}
}
catch (SQLException ex) {
logger.log(Level.WARNING, "SQL Exception occurred: ", ex);
logger.log(Level.WARNING, "SQL Exception occurred: ", ex); //NON-NLS
}
// catch (TskCoreException ex) {
// logger.log(Level.WARNING, "TskCore Exception occurred: ", ex);
@ -278,7 +278,7 @@ public abstract class AbstractAbstractFileNode<T extends AbstractFile> extends A
try {
skCase.closeRunQuery(rs);
} catch (SQLException ex) {
logger.log(Level.WARNING, "Error closing result set after getting hashset hits", ex);
logger.log(Level.WARNING, "Error closing result set after getting hashset hits", ex); //NON-NLS
}
}
}

View File

@ -52,7 +52,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
super(new ContentChildren(content), Lookups.singleton(content));
this.content = content;
//super.setName(ContentUtils.getSystemName(content));
super.setName("content_" + Long.toString(content.getId()));
super.setName("content_" + Long.toString(content.getId())); //NON-NLS
}
/**
@ -87,7 +87,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
try {
hasChildren = content.hasChildren();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error checking if the node has children, for content: " + content, ex);
logger.log(Level.SEVERE, "Error checking if the node has children, for content: " + content, ex); //NON-NLS
}
}
@ -107,7 +107,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
try {
childrenIds = content.getChildrenIds();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting children ids, for content: " + content, ex);
logger.log(Level.SEVERE, "Error getting children ids, for content: " + content, ex); //NON-NLS
}
}
@ -127,7 +127,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
try {
children = content.getChildren();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting children, for content: " + content, ex);
logger.log(Level.SEVERE, "Error getting children, for content: " + content, ex); //NON-NLS
}
}
@ -150,7 +150,7 @@ public abstract class AbstractContentNode<T extends Content> extends ContentNode
try {
childrenCount = content.getChildrenCount();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error checking node content children count, for content: " + content, ex);
logger.log(Level.SEVERE, "Error checking node content children count, for content: " + content, ex); //NON-NLS
}
}

View File

@ -36,7 +36,7 @@ public abstract class AbstractFsContentNode<T extends AbstractFile> extends Abst
private boolean directoryBrowseMode;
public static final String HIDE_PARENT = "hide_parent";
public static final String HIDE_PARENT = "hide_parent"; //NON-NLS
AbstractFsContentNode(T fsContent) {
this(fsContent, true);

View File

@ -54,29 +54,29 @@ public class ArtifactStringContent implements StringContent {
if (stringContent.isEmpty()) {
try {
StringBuilder buffer = new StringBuilder();
buffer.append("<html>\n");
buffer.append("<body>\n");
buffer.append("<html>\n"); //NON-NLS
buffer.append("<body>\n"); //NON-NLS
// artifact name header
buffer.append("<h4>");
buffer.append("<h4>"); //NON-NLS
buffer.append(wrapped.getDisplayName());
buffer.append("</h4>\n");
buffer.append("</h4>\n"); //NON-NLS
// start table for attributes
buffer.append("<table border='0'>");
buffer.append("<tr>");
buffer.append("</tr>\n");
buffer.append("<table border='0'>"); //NON-NLS
buffer.append("<tr>"); //NON-NLS
buffer.append("</tr>\n"); //NON-NLS
// cycle through each attribute and display in a row in the table.
for (BlackboardAttribute attr : wrapped.getAttributes()) {
// name column
buffer.append("<tr><td>");
buffer.append("<tr><td>"); //NON-NLS
buffer.append(attr.getAttributeTypeDisplayName());
buffer.append("</td>");
buffer.append("</td>"); //NON-NLS
// value column
buffer.append("<td>");
buffer.append("<td>"); //NON-NLS
if (attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_ACCESSED.getTypeID()
|| attr.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME_CREATED.getTypeID()
@ -96,10 +96,10 @@ public class ArtifactStringContent implements StringContent {
switch (attr.getValueType()) {
case STRING:
String str = attr.getValueString();
str = str.replaceAll(" ", "&nbsp;");
str = str.replaceAll("<", "&lt;");
str = str.replaceAll(">", "&gt;");
str = str.replaceAll("(\r\n|\n)", "<br />");
str = str.replaceAll(" ", "&nbsp;"); //NON-NLS
str = str.replaceAll("<", "&lt;"); //NON-NLS
str = str.replaceAll(">", "&gt;"); //NON-NLS
str = str.replaceAll("(\r\n|\n)", "<br />"); //NON-NLS
buffer.append(str);
break;
case INTEGER:
@ -121,8 +121,8 @@ public class ArtifactStringContent implements StringContent {
buffer.append(attr.getContext());
buffer.append(")");
}
buffer.append("</td>");
buffer.append("</tr>\n");
buffer.append("</td>"); //NON-NLS
buffer.append("</tr>\n"); //NON-NLS
}
final Content content = getAssociatedContent(wrapped);
@ -131,22 +131,22 @@ public class ArtifactStringContent implements StringContent {
try {
path = content.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() on {0} : {1}", new Object[]{content, ex.getLocalizedMessage()});
logger.log(Level.SEVERE, "Exception while calling Content.getUniquePath() on {0} : {1}", new Object[]{content, ex.getLocalizedMessage()}); //NON-NLS
}
//add file path
buffer.append("<tr>");
buffer.append("<td>");
buffer.append("<tr>"); //NON-NLS
buffer.append("<td>"); //NON-NLS
buffer.append(NbBundle.getMessage(this.getClass(), "ArtifactStringContent.getStr.srcFilePath.text"));
buffer.append("</td>");
buffer.append("<td>");
buffer.append("</td>"); //NON-NLS
buffer.append("<td>"); //NON-NLS
buffer.append(path);
buffer.append("</td>");
buffer.append("</tr>\n");
buffer.append("</td>"); //NON-NLS
buffer.append("</tr>\n"); //NON-NLS
buffer.append("</table>");
buffer.append("</html>\n");
buffer.append("</table>"); //NON-NLS
buffer.append("</html>\n"); //NON-NLS
stringContent = buffer.toString();
} catch (TskException ex) {
@ -161,7 +161,7 @@ public class ArtifactStringContent implements StringContent {
try {
return artifact.getSleuthkitCase().getContentById(artifact.getObjectID());
} catch (TskException ex) {
logger.log(Level.WARNING, "Getting file failed", ex);
logger.log(Level.WARNING, "Getting file failed", ex); //NON-NLS
}
throw new IllegalArgumentException(NbBundle.getMessage(ArtifactStringContent.class, "ArtifactStringContent.exception.msg"));
}

View File

@ -49,7 +49,7 @@ class ArtifactTypeChildren extends ChildFactory<BlackboardArtifact>{
list.addAll(arts);
} catch (TskException ex) {
Logger.getLogger(ArtifactTypeChildren.class.getName())
.log(Level.SEVERE, "Couldn't get blackboard artifacts from database", ex);
.log(Level.SEVERE, "Couldn't get blackboard artifacts from database", ex); //NON-NLS
}
return true;
}

View File

@ -49,11 +49,11 @@ public class ArtifactTypeNode extends DisplayableItemNode {
this.childCount = skCase.getBlackboardArtifactsTypeCount(type.getTypeID());
} catch (TskException ex) {
Logger.getLogger(ArtifactTypeNode.class.getName())
.log(Level.WARNING, "Error getting child count", ex);
.log(Level.WARNING, "Error getting child count", ex); //NON-NLS
}
super.setDisplayName(type.getDisplayName() + " (" + childCount + ")");
this.type = type;
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(type));
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(type)); //NON-NLS
}
@ -88,49 +88,49 @@ public class ArtifactTypeNode extends DisplayableItemNode {
private String getIcon(BlackboardArtifact.ARTIFACT_TYPE type) {
switch (type) {
case TSK_WEB_BOOKMARK:
return "bookmarks.png";
return "bookmarks.png"; //NON-NLS
case TSK_WEB_COOKIE:
return "cookies.png";
return "cookies.png"; //NON-NLS
case TSK_WEB_HISTORY:
return "history.png";
return "history.png"; //NON-NLS
case TSK_WEB_DOWNLOAD:
return "downloads.png";
return "downloads.png"; //NON-NLS
case TSK_INSTALLED_PROG:
return "programs.png";
return "programs.png"; //NON-NLS
case TSK_RECENT_OBJECT:
return "recent_docs.png";
return "recent_docs.png"; //NON-NLS
case TSK_DEVICE_ATTACHED:
return "usb_devices.png";
return "usb_devices.png"; //NON-NLS
case TSK_WEB_SEARCH_QUERY:
return "searchquery.png";
return "searchquery.png"; //NON-NLS
case TSK_METADATA_EXIF:
return "camera-icon-16.png";
return "camera-icon-16.png"; //NON-NLS
case TSK_CONTACT:
return "contact.png";
return "contact.png"; //NON-NLS
case TSK_MESSAGE:
return "message.png";
return "message.png"; //NON-NLS
case TSK_CALLLOG:
return "calllog.png";
return "calllog.png"; //NON-NLS
case TSK_CALENDAR_ENTRY:
return "calendar.png";
return "calendar.png"; //NON-NLS
case TSK_SPEED_DIAL_ENTRY:
return "speeddialentry.png";
return "speeddialentry.png"; //NON-NLS
case TSK_BLUETOOTH_PAIRING:
return "bluetooth.png";
return "bluetooth.png"; //NON-NLS
case TSK_GPS_BOOKMARK:
return "gpsfav.png";
return "gpsfav.png"; //NON-NLS
case TSK_GPS_LAST_KNOWN_LOCATION:
return "gps-lastlocation.png";
return "gps-lastlocation.png"; //NON-NLS
case TSK_GPS_SEARCH:
return "gps-search.png";
return "gps-search.png"; //NON-NLS
case TSK_SERVICE_ACCOUNT:
return "account-icon-16.png";
return "account-icon-16.png"; //NON-NLS
case TSK_ENCRYPTION_DETECTED:
return "encrypted-file.png";
return "encrypted-file.png"; //NON-NLS
case TSK_EXT_MISMATCH_DETECTED:
return "mismatch-16.png";
return "mismatch-16.png"; //NON-NLS
}
return "artifact-icon.png";
return "artifact-icon.png"; //NON-NLS
}
@Override

View File

@ -93,7 +93,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
this.associated = this.getLookup().lookup(Content.class);
this.setName(Long.toString(artifact.getArtifactID()));
this.setDisplayName(associated.getName());
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID())));
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/" + getIcon(BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID()))); //NON-NLS
}
@ -154,7 +154,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
}
}
if (actualMimeType.isEmpty()) {
logger.log(Level.WARNING, "Could not find expected TSK_FILE_TYPE_SIG attribute.");
logger.log(Level.WARNING, "Could not find expected TSK_FILE_TYPE_SIG attribute."); //NON-NLS
} else {
ss.put(new NodeProperty<>(
NbBundle.getMessage(this.getClass(), "BlackboardArtifactNode.createSheet.mimeType.name"),
@ -163,7 +163,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
actualMimeType));
}
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error while searching for TSK_FILE_TYPE_SIG attribute: ", ex);
logger.log(Level.WARNING, "Error while searching for TSK_FILE_TYPE_SIG attribute: ", ex); //NON-NLS
}
}
@ -172,7 +172,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
try {
sourcePath = associated.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Failed to get unique path from: {0}", associated.getName());
logger.log(Level.WARNING, "Failed to get unique path from: {0}", associated.getName()); //NON-NLS
}
if (sourcePath.isEmpty() == false) {
@ -192,7 +192,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
dataSource = getRootParentName();
}
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Failed to get image name from {0}", associated.getName());
logger.log(Level.WARNING, "Failed to get image name from {0}", associated.getName()); //NON-NLS
}
if (dataSource.isEmpty() == false) {
@ -215,7 +215,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
parentName = parent.getName();
}
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Failed to get parent name from {0}", associated.getName());
logger.log(Level.WARNING, "Failed to get parent name from {0}", associated.getName()); //NON-NLS
return "";
}
return parentName;
@ -285,7 +285,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
}
}
} catch (TskException ex) {
logger.log(Level.SEVERE, "Getting attributes failed", ex);
logger.log(Level.SEVERE, "Getting attributes failed", ex); //NON-NLS
}
}
@ -313,7 +313,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
try {
return artifact.getSleuthkitCase().getContentById(artifact.getObjectID());
} catch (TskException ex) {
logger.log(Level.WARNING, "Getting file failed", ex);
logger.log(Level.WARNING, "Getting file failed", ex); //NON-NLS
}
throw new IllegalArgumentException(
NbBundle.getMessage(BlackboardArtifactNode.class, "BlackboardArtifactNode.getAssocCont.exception.msg"));
@ -348,7 +348,7 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
return highlightFactory.createInstance(content, keyword, isRegexp, origQuery);
}
} catch (TskException ex) {
logger.log(Level.WARNING, "Failed to retrieve Blackboard Attributes", ex);
logger.log(Level.WARNING, "Failed to retrieve Blackboard Attributes", ex); //NON-NLS
}
return null;
}
@ -357,54 +357,54 @@ public class BlackboardArtifactNode extends DisplayableItemNode {
private String getIcon(BlackboardArtifact.ARTIFACT_TYPE type) {
switch (type) {
case TSK_WEB_BOOKMARK:
return "bookmarks.png";
return "bookmarks.png"; //NON-NLS
case TSK_WEB_COOKIE:
return "cookies.png";
return "cookies.png"; //NON-NLS
case TSK_WEB_HISTORY:
return "history.png";
return "history.png"; //NON-NLS
case TSK_WEB_DOWNLOAD:
return "downloads.png";
return "downloads.png"; //NON-NLS
case TSK_INSTALLED_PROG:
return "programs.png";
return "programs.png"; //NON-NLS
case TSK_RECENT_OBJECT:
return "recent_docs.png";
return "recent_docs.png"; //NON-NLS
case TSK_DEVICE_ATTACHED:
return "usb_devices.png";
return "usb_devices.png"; //NON-NLS
case TSK_WEB_SEARCH_QUERY:
return "searchquery.png";
return "searchquery.png"; //NON-NLS
case TSK_TAG_FILE:
return "blue-tag-icon-16.png";
return "blue-tag-icon-16.png"; //NON-NLS
case TSK_TAG_ARTIFACT:
return "green-tag-icon-16.png";
return "green-tag-icon-16.png"; //NON-NLS
case TSK_METADATA_EXIF:
return "camera-icon-16.png";
return "camera-icon-16.png"; //NON-NLS
case TSK_CONTACT:
return "contact.png";
return "contact.png"; //NON-NLS
case TSK_MESSAGE:
return "message.png";
return "message.png"; //NON-NLS
case TSK_CALLLOG:
return "calllog.png";
return "calllog.png"; //NON-NLS
case TSK_CALENDAR_ENTRY:
return "calendar.png";
return "calendar.png"; //NON-NLS
case TSK_SPEED_DIAL_ENTRY:
return "speeddialentry.png";
return "speeddialentry.png"; //NON-NLS
case TSK_BLUETOOTH_PAIRING:
return "bluetooth.png";
return "bluetooth.png"; //NON-NLS
case TSK_GPS_BOOKMARK:
return "gpsfav.png";
return "gpsfav.png"; //NON-NLS
case TSK_GPS_LAST_KNOWN_LOCATION:
return "gps-lastlocation.png";
return "gps-lastlocation.png"; //NON-NLS
case TSK_GPS_SEARCH:
return "gps-search.png";
return "gps-search.png"; //NON-NLS
case TSK_SERVICE_ACCOUNT:
return "account-icon-16.png";
return "account-icon-16.png"; //NON-NLS
case TSK_ENCRYPTION_DETECTED:
return "encrypted-file.png";
return "encrypted-file.png"; //NON-NLS
case TSK_EXT_MISMATCH_DETECTED:
return "mismatch-16.png";
return "mismatch-16.png"; //NON-NLS
}
return "artifact-icon.png";
return "artifact-icon.png"; //NON-NLS
}
@Override

View File

@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.TskCoreException;
*/
public class BlackboardArtifactTagNode extends DisplayableItemNode {
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/green-tag-icon-16.png";
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/green-tag-icon-16.png"; //NON-NLS
private final BlackboardArtifactTag tag;
public BlackboardArtifactTagNode(BlackboardArtifactTag tag) {
@ -68,7 +68,7 @@ public class BlackboardArtifactTagNode extends DisplayableItemNode {
try {
contentPath = tag.getContent().getUniquePath();
} catch (TskCoreException ex) {
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex);
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex); //NON-NLS
contentPath = NbBundle.getMessage(this.getClass(), "BlackboardArtifactTagNode.createSheet.unavail.text");
}
properties.put(new NodeProperty<>(

View File

@ -57,7 +57,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
try {
children = parent.getChildren();
} catch (TskException ex) {
logger.log(Level.WARNING, "Error getting Content children.", ex);
logger.log(Level.WARNING, "Error getting Content children.", ex); //NON-NLS
children = Collections.emptyList();
}

View File

@ -57,7 +57,7 @@ import org.sleuthkit.datamodel.VolumeSystem;
try {
children = parent.getChildren();
} catch (TskException ex) {
logger.log(Level.WARNING, "Error getting Content children.", ex);
logger.log(Level.WARNING, "Error getting Content children.", ex); //NON-NLS
children = Collections.emptyList();
}

View File

@ -38,7 +38,7 @@ import org.sleuthkit.datamodel.TskCoreException;
*/
class ContentTagNode extends DisplayableItemNode {
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/blue-tag-icon-16.png";
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/blue-tag-icon-16.png"; //NON-NLS
private final ContentTag tag;
public ContentTagNode(ContentTag tag) {
@ -66,7 +66,7 @@ class ContentTagNode extends DisplayableItemNode {
try {
contentPath = tag.getContent().getUniquePath();
} catch (TskCoreException ex) {
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex);
Logger.getLogger(ContentTagNode.class.getName()).log(Level.SEVERE, "Failed to get path for content (id = " + tag.getContent().getId() + ")", ex); //NON-NLS
contentPath = NbBundle.getMessage(this.getClass(), "ContentTagNode.createSheet.unavail.path");
}
properties.put(new NodeProperty<>(NbBundle.getMessage(this.getClass(), "ContentTagNode.createSheet.filePath.name"),

View File

@ -40,7 +40,7 @@ import org.sleuthkit.datamodel.TskCoreException;
public class ContentTagTypeNode extends DisplayableItemNode {
private static final String DISPLAY_NAME = NbBundle.getMessage(ContentTagTypeNode.class, "ContentTagTypeNode.displayName.text");
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png";
private static final String ICON_PATH = "org/sleuthkit/autopsy/images/tag-folder-blue-icon-16.png"; //NON-NLS
public ContentTagTypeNode(TagName tagName) {
super(Children.create(new ContentTagNodeFactory(tagName), true), Lookups.singleton(tagName.getDisplayName() + " " + DISPLAY_NAME));
@ -49,7 +49,7 @@ public class ContentTagTypeNode extends DisplayableItemNode {
try {
tagsCount = Case.getCurrentCase().getServices().getTagsManager().getContentTagsCountByTagName(tagName);
} catch (TskCoreException ex) {
Logger.getLogger(ContentTagTypeNode.class.getName()).log(Level.SEVERE, "Failed to get content tags count for " + tagName.getDisplayName() + " tag name", ex);
Logger.getLogger(ContentTagTypeNode.class.getName()).log(Level.SEVERE, "Failed to get content tags count for " + tagName.getDisplayName() + " tag name", ex); //NON-NLS
}
super.setName(DISPLAY_NAME);
@ -98,7 +98,7 @@ public class ContentTagTypeNode extends DisplayableItemNode {
try {
keys.addAll(Case.getCurrentCase().getServices().getTagsManager().getContentTagsByTagName(tagName));
} catch (TskCoreException ex) {
Logger.getLogger(ContentTagTypeNode.ContentTagNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex);
Logger.getLogger(ContentTagTypeNode.ContentTagNodeFactory.class.getName()).log(Level.SEVERE, "Failed to get tag names", ex); //NON-NLS
}
return true;
}

View File

@ -75,7 +75,7 @@ public final class ContentUtils {
}
public static String getStringTimeISO8601(long epochSeconds, TimeZone tzone) {
String time = "0000-00-00T00:00:00Z";
String time = "0000-00-00T00:00:00Z"; //NON-NLS
if (epochSeconds != 0) {
dateFormatterISO8601.setTimeZone(tzone);
time = dateFormatterISO8601.format(new java.util.Date(epochSeconds * 1000));
@ -259,7 +259,7 @@ public final class ContentUtils {
ContentUtils.writeToFile(f, dest, progress, worker, source);
} catch (IOException ex) {
logger.log(Level.SEVERE,
"Trouble extracting file to " + dest.getAbsolutePath(),
"Trouble extracting file to " + dest.getAbsolutePath(), //NON-NLS
ex);
}
return null;
@ -271,7 +271,7 @@ public final class ContentUtils {
ContentUtils.writeToFile(f, dest, progress, worker, source);
} catch (IOException ex) {
logger.log(Level.SEVERE,
"Trouble extracting unallocated content file to " + dest.getAbsolutePath(),
"Trouble extracting unallocated content file to " + dest.getAbsolutePath(), //NON-NLS
ex);
}
return null;
@ -283,7 +283,7 @@ public final class ContentUtils {
ContentUtils.writeToFile(df, dest, progress, worker, source);
} catch (IOException ex) {
logger.log(Level.SEVERE,
"Error extracting derived file to " + dest.getAbsolutePath(),
"Error extracting derived file to " + dest.getAbsolutePath(), //NON-NLS
ex);
}
return null;
@ -295,7 +295,7 @@ public final class ContentUtils {
ContentUtils.writeToFile(lf, dest, progress, worker, source);
} catch (IOException ex) {
logger.log(Level.SEVERE,
"Error extracting local file to " + dest.getAbsolutePath(),
"Error extracting local file to " + dest.getAbsolutePath(), //NON-NLS
ex);
}
return null;
@ -349,7 +349,7 @@ public final class ContentUtils {
}
} catch (TskException ex) {
logger.log(Level.SEVERE,
"Trouble fetching children to extract.", ex);
"Trouble fetching children to extract.", ex); //NON-NLS
}
return null;

View File

@ -27,7 +27,7 @@ import java.util.Formatter;
*/
public class DataConversion {
final private static char[] hexArray = "0123456789ABCDEF".toCharArray();
final private static char[] hexArray = "0123456789ABCDEF".toCharArray(); //NON-NLS
/**
* Return the hex-dump layout of the passed in byte array.
@ -67,7 +67,7 @@ public class DataConversion {
// print the offset column
//outputStringBuilder.append("0x");
outputStringBuilder.append(String.format("0x%08x: ", arrayOffset + curOffset));
outputStringBuilder.append(String.format("0x%08x: ", arrayOffset + curOffset)); //NON-NLS
//outputStringBuilder.append(": ");
// print the hex columns

View File

@ -36,7 +36,7 @@ public class DataSourcesNode extends DisplayableItemNode {
super(new RootContentChildren(images), Lookups.singleton(NAME));
setName(NAME);
setDisplayName(NAME);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/image.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/image.png"); //NON-NLS
}
@Override

View File

@ -53,10 +53,10 @@ public class DeletedContent implements AutopsyVisitableItem {
public enum DeletedContentFilter implements AutopsyVisitableItem {
FS_DELETED_FILTER(0,
"FS_DELETED_FILTER",
"FS_DELETED_FILTER", //NON-NLS
NbBundle.getMessage(DeletedContent.class, "DeletedContent.fsDelFilter.text")),
ALL_DELETED_FILTER(1,
"ALL_DELETED_FILTER",
"ALL_DELETED_FILTER", //NON-NLS
NbBundle.getMessage(DeletedContent.class, "DeletedContent.allDelFilter.text"));
private int id;
private String name;
@ -111,7 +111,7 @@ public class DeletedContent implements AutopsyVisitableItem {
super.setName(NAME);
super.setDisplayName(NAME);
this.skCase = skCase;
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
}
@Override
@ -173,7 +173,7 @@ public class DeletedContent implements AutopsyVisitableItem {
String tooltip = filter.getDisplayName();
this.setShortDescription(tooltip);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
//get count of children without preloading all children nodes
final long count = new DeletedContentChildren(filter, skCase).calculateItems();
@ -245,21 +245,21 @@ public class DeletedContent implements AutopsyVisitableItem {
String query = "";
switch (filter) {
case FS_DELETED_FILTER:
query = "dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue()
+ " AND meta_flags != " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue()
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType();
query = "dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue() //NON-NLS
+ " AND meta_flags != " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue() //NON-NLS
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType(); //NON-NLS
break;
case ALL_DELETED_FILTER:
query = " ( "
+ "( "
+ "(dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue()
+ " OR "
+ "meta_flags = " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue()
+ "(dir_flags = " + TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC.getValue() //NON-NLS
+ " OR " //NON-NLS
+ "meta_flags = " + TskData.TSK_FS_META_FLAG_ENUM.ORPHAN.getValue() //NON-NLS
+ ")"
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType()
+ " AND type = " + TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType() //NON-NLS
+ " )"
+ " OR type = " + TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.getFileType()
+ " OR type = " + TskData.TSK_DB_FILES_TYPE_ENUM.CARVED.getFileType() //NON-NLS
+ " )";
//+ " AND type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType()
//+ " AND type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNUSED_BLOCKS.getFileType()
@ -270,11 +270,11 @@ public class DeletedContent implements AutopsyVisitableItem {
break;
default:
logger.log(Level.SEVERE, "Unsupported filter type to get deleted content: {0}", filter);
logger.log(Level.SEVERE, "Unsupported filter type to get deleted content: {0}", filter); //NON-NLS
}
query += " LIMIT " + MAX_OBJECTS;
query += " LIMIT " + MAX_OBJECTS; //NON-NLS
return query;
}
@ -285,7 +285,7 @@ public class DeletedContent implements AutopsyVisitableItem {
try {
ret = skCase.findAllFilesWhere(query);
} catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error getting files for the deleted content view using: " + query, e);
logger.log(Level.SEVERE, "Error getting files for the deleted content view using: " + query, e); //NON-NLS
}
return ret;
@ -301,7 +301,7 @@ public class DeletedContent implements AutopsyVisitableItem {
try {
return skCase.countFilesWhere(makeQuery());
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting deleted files search view count", ex);
logger.log(Level.SEVERE, "Error getting deleted files search view count", ex); //NON-NLS
return 0;
}
}

View File

@ -56,9 +56,9 @@ public class DirectoryNode extends AbstractFsContentNode<AbstractFile> {
private void setIcon(AbstractFile dir) {
// set name, display name, and icon
if (dir.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png"); //NON-NLS
} else {
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); //NON-NLS
}
}

View File

@ -67,15 +67,15 @@ public class EmailExtracted implements AutopsyVisitableItem {
try {
int artId = BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG.getTypeID();
int pathAttrId = BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PATH.getTypeID();
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id "
+ "FROM blackboard_attributes,blackboard_artifacts WHERE "
+ "attribute_type_id=" + pathAttrId
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id"
+ " AND blackboard_artifacts.artifact_type_id=" + artId;
String query = "SELECT value_text,blackboard_attributes.artifact_id,attribute_type_id " //NON-NLS
+ "FROM blackboard_attributes,blackboard_artifacts WHERE " //NON-NLS
+ "attribute_type_id=" + pathAttrId //NON-NLS
+ " AND blackboard_attributes.artifact_id=blackboard_artifacts.artifact_id" //NON-NLS
+ " AND blackboard_artifacts.artifact_type_id=" + artId; //NON-NLS
ResultSet rs = skCase.runQuery(query);
while (rs.next()) {
final String path = rs.getString("value_text");
final long artifactId = rs.getLong("artifact_id");
final String path = rs.getString("value_text"); //NON-NLS
final long artifactId = rs.getLong("artifact_id"); //NON-NLS
final Map<String, String> parsedPath = parsePath(path);
final String account = parsedPath.get(MAIL_ACCOUNT);
final String folder = parsedPath.get(MAIL_FOLDER);
@ -95,7 +95,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
skCase.closeRunQuery(rs);
} catch (SQLException ex) {
logger.log(Level.WARNING, "Cannot initialize email extraction", ex);
logger.log(Level.WARNING, "Cannot initialize email extraction", ex); //NON-NLS
}
}
@ -103,7 +103,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
Map<String, String> parsed = new HashMap<>();
String[] split = path.split(MAIL_PATH_SEPARATOR);
if (split.length < 4) {
logger.log(Level.WARNING, "Unexpected number of tokens when parsing email PATH: {0}, will use defaults", split.length);
logger.log(Level.WARNING, "Unexpected number of tokens when parsing email PATH: {0}, will use defaults", split.length); //NON-NLS
parsed.put(MAIL_ACCOUNT, NbBundle.getMessage(EmailExtracted.class, "EmailExtracted.defaultAcct.text"));
parsed.put(MAIL_FOLDER, NbBundle.getMessage(EmailExtracted.class, "EmailExtracted.defaultFolder.text"));
return parsed;
@ -128,7 +128,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
super(Children.create(new EmailExtractedRootChildrenFlat(), true), Lookups.singleton(DISPLAY_NAME));
super.setName(LABEL_NAME);
super.setDisplayName(DISPLAY_NAME);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png"); //NON-NLS
initArtifacts();
}
@ -182,7 +182,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
//TODO: bulk artifact gettings
tempList.add(skCase.getBlackboardArtifact(l));
} catch (TskException ex) {
logger.log(Level.WARNING, "Error creating mail messages nodes", ex);
logger.log(Level.WARNING, "Error creating mail messages nodes", ex); //NON-NLS
}
}
}
@ -208,7 +208,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
super(Children.create(new EmailExtractedRootChildren(), true), Lookups.singleton(DISPLAY_NAME));
super.setName(LABEL_NAME);
super.setDisplayName(DISPLAY_NAME);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/mail-icon-16.png"); //NON-NLS
initArtifacts();
}
@ -267,7 +267,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
super(Children.create(new EmailExtractedAccountChildrenNode(children), true), Lookups.singleton(name));
super.setName(name);
super.setDisplayName(name + " (" + children.size() + ")");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/account-icon-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/account-icon-16.png"); //NON-NLS
}
@Override
@ -332,7 +332,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
super(Children.create(new EmailExtractedFolderChildrenNode(children), true), Lookups.singleton(name));
super.setName(name);
super.setDisplayName(name + " (" + children.size() + ")");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-16.png"); //NON-NLS
}
@Override
@ -383,7 +383,7 @@ public class EmailExtracted implements AutopsyVisitableItem {
//TODO: bulk artifact gettings
tempList.add(skCase.getBlackboardArtifact(l));
} catch (TskException ex) {
logger.log(Level.WARNING, "Error creating mail messages nodes", ex);
logger.log(Level.WARNING, "Error creating mail messages nodes", ex); //NON-NLS
}
}
list.addAll(tempList);

View File

@ -71,7 +71,7 @@ class ExtractedContentChildren extends ChildFactory<BlackboardArtifact.ARTIFACT_
});
list.addAll(inUse);
} catch (TskCoreException ex) {
Logger.getLogger(ExtractedContentChildren.class.getName()).log(Level.SEVERE, "Error getting list of artifacts in use: " + ex.getLocalizedMessage());
Logger.getLogger(ExtractedContentChildren.class.getName()).log(Level.SEVERE, "Error getting list of artifacts in use: " + ex.getLocalizedMessage()); //NON-NLS
return false;
}
return true;

View File

@ -36,7 +36,7 @@ public class ExtractedContentNode extends DisplayableItemNode {
super(Children.create(new ExtractedContentChildren(skCase), true), Lookups.singleton(NAME));
super.setName(NAME);
super.setDisplayName(NAME);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/extracted_content.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/extracted_content.png"); //NON-NLS
}
@Override

View File

@ -59,9 +59,9 @@ public class FileNode extends AbstractFsContentNode<AbstractFile> {
// set name, display name, and icon
if (file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) {
if (file.getType().equals(TSK_DB_FILES_TYPE_ENUM.CARVED)) {
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/carved-file-icon-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/carved-file-icon-16.png"); //NON-NLS
} else {
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); //NON-NLS
}
} else {
this.setIconBaseWithExtension(getIconForFileType(file));
@ -112,66 +112,66 @@ public class FileNode extends AbstractFsContentNode<AbstractFile> {
String name = file.getName();
int dotIndex = name.lastIndexOf(".");
if (dotIndex == -1) {
return "org/sleuthkit/autopsy/images/file-icon.png";
return "org/sleuthkit/autopsy/images/file-icon.png"; //NON-NLS
}
String ext = name.substring(dotIndex).toLowerCase();
// Images
for (String s : FileTypeExtensions.getImageExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/image-file.png";
return "org/sleuthkit/autopsy/images/image-file.png"; //NON-NLS
}
}
// Videos
for (String s : FileTypeExtensions.getVideoExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/video-file.png";
return "org/sleuthkit/autopsy/images/video-file.png"; //NON-NLS
}
}
// Audio Files
for (String s : FileTypeExtensions.getAudioExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/audio-file.png";
return "org/sleuthkit/autopsy/images/audio-file.png"; //NON-NLS
}
}
// Documents
for (String s : FileTypeExtensions.getDocumentExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/doc-file.png";
return "org/sleuthkit/autopsy/images/doc-file.png"; //NON-NLS
}
}
// Executables / System Files
for (String s : FileTypeExtensions.getExecutableExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/exe-file.png";
return "org/sleuthkit/autopsy/images/exe-file.png"; //NON-NLS
}
}
// Text Files
for (String s : FileTypeExtensions.getTextExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/text-file.png";
return "org/sleuthkit/autopsy/images/text-file.png"; //NON-NLS
}
}
// Web Files
for (String s : FileTypeExtensions.getWebExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/web-file.png";
return "org/sleuthkit/autopsy/images/web-file.png"; //NON-NLS
}
}
// PDFs
for (String s : FileTypeExtensions.getPDFExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/pdf-file.png";
return "org/sleuthkit/autopsy/images/pdf-file.png"; //NON-NLS
}
}
// Archives
for (String s : FileTypeExtensions.getArchiveExtensions()) {
if (ext.equals(s)) {
return "org/sleuthkit/autopsy/images/archive-file.png";
return "org/sleuthkit/autopsy/images/archive-file.png"; //NON-NLS
}
}
// Else return the default
return "org/sleuthkit/autopsy/images/file-icon.png";
return "org/sleuthkit/autopsy/images/file-icon.png"; //NON-NLS
}

View File

@ -53,9 +53,9 @@ public class FileSize implements AutopsyVisitableItem {
public enum FileSizeFilter implements AutopsyVisitableItem {
SIZE_50_200(0, "SIZE_50_200", "50 - 200MB"),
SIZE_200_1000(1, "SIZE_200_1GB", "200MB - 1GB"),
SIZE_1000_(2, "SIZE_1000+", "1GB+");
SIZE_50_200(0, "SIZE_50_200", "50 - 200MB"), //NON-NLS
SIZE_200_1000(1, "SIZE_200_1GB", "200MB - 1GB"), //NON-NLS
SIZE_1000_(2, "SIZE_1000+", "1GB+"); //NON-NLS
private int id;
private String name;
private String displayName;
@ -106,7 +106,7 @@ public class FileSize implements AutopsyVisitableItem {
super(Children.create(new FileSizeRootChildren(skCase), true), Lookups.singleton(NAME));
super.setName(NAME);
super.setDisplayName(NAME);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png"); //NON-NLS
}
@Override
@ -168,7 +168,7 @@ public class FileSize implements AutopsyVisitableItem {
String tooltip = filter.getDisplayName();
this.setShortDescription(tooltip);
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png");
this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-size-16.png"); //NON-NLS
//get count of children without preloading all children nodes
final long count = new FileSizeChildren(filter, skCase).calculateItems();
@ -229,22 +229,22 @@ public class FileSize implements AutopsyVisitableItem {
String query;
switch (filter) {
case SIZE_50_200:
query = "(size >= 50000000 AND size < 200000000)";
query = "(size >= 50000000 AND size < 200000000)"; //NON-NLS
break;
case SIZE_200_1000:
query = "(size >= 200000000 AND size < 1000000000)";
query = "(size >= 200000000 AND size < 1000000000)"; //NON-NLS
break;
case SIZE_1000_:
query = "(size >= 1000000000)";
query = "(size >= 1000000000)"; //NON-NLS
break;
default:
logger.log(Level.SEVERE, "Unsupported filter type to get files by size: {0}", filter);
logger.log(Level.SEVERE, "Unsupported filter type to get files by size: {0}", filter); //NON-NLS
return null;
}
// ignore unalloc block files
query = query + " AND (type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType() + ")";
query = query + " AND (type != " + TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS.getFileType() + ")"; //NON-NLS
return query;
}
@ -260,7 +260,7 @@ public class FileSize implements AutopsyVisitableItem {
try {
ret = skCase.findAllFilesWhere(query);
} catch (TskCoreException e) {
logger.log(Level.SEVERE, "Error getting files for the file size view using: " + query, e);
logger.log(Level.SEVERE, "Error getting files for the file size view using: " + query, e); //NON-NLS
}
return ret;
@ -276,7 +276,7 @@ public class FileSize implements AutopsyVisitableItem {
try {
return skCase.countFilesWhere(makeQuery());
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting files by size search view count", ex);
logger.log(Level.SEVERE, "Error getting files by size search view count", ex); //NON-NLS
return 0;
}
}

View File

@ -61,10 +61,10 @@ class FileTypeChildren extends ChildFactory<Content> {
}
private String createQuery(){
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")"
+ " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ") AND (0";
String query = "(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")" //NON-NLS
+ " AND (known IS NULL OR known != " + TskData.FileKnown.KNOWN.getFileKnownValue() + ") AND (0"; //NON-NLS
for(String s : filter.getFilter()){
query += " OR name LIKE '%" + s + "'";
query += " OR name LIKE '%" + s + "'"; //NON-NLS
}
query += ')';
// query += " LIMIT " + MAX_OBJECTS;
@ -77,7 +77,7 @@ class FileTypeChildren extends ChildFactory<Content> {
try {
list = skCase.findAllFilesWhere(createQuery());
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Couldn't get search results", ex);
logger.log(Level.SEVERE, "Couldn't get search results", ex); //NON-NLS
}
return list;
@ -92,7 +92,7 @@ class FileTypeChildren extends ChildFactory<Content> {
try {
return skCase.countFilesWhere(createQuery());
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting file search view count", ex);
logger.log(Level.SEVERE, "Error getting file search view count", ex); //NON-NLS
return 0;
}
}

View File

@ -33,24 +33,24 @@ import org.sleuthkit.datamodel.SleuthkitCase;
// root node filters
public enum RootFilter implements AutopsyVisitableItem,SearchFilterInterface {
TSK_IMAGE_FILTER(0, "TSK_IMAGE_FILTER",
TSK_IMAGE_FILTER(0, "TSK_IMAGE_FILTER", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskImgFilter.text"),
FileTypeExtensions.getImageExtensions()),
TSK_VIDEO_FILTER(1, "TSK_VIDEO_FILTER",
TSK_VIDEO_FILTER(1, "TSK_VIDEO_FILTER", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskVideoFilter.text"),
FileTypeExtensions.getVideoExtensions()),
TSK_AUDIO_FILTER(2, "TSK_AUDIO_FILTER",
TSK_AUDIO_FILTER(2, "TSK_AUDIO_FILTER", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskAudioFilter.text"),
FileTypeExtensions.getAudioExtensions()),
TSK_ARCHIVE_FILTER(3, "TSK_ARCHIVE_FILTER",
TSK_ARCHIVE_FILTER(3, "TSK_ARCHIVE_FILTER", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskArchiveFilter.text"),
FileTypeExtensions.getArchiveExtensions()),
TSK_DOCUMENT_FILTER(3, "TSK_DOCUMENT_FILTER",
TSK_DOCUMENT_FILTER(3, "TSK_DOCUMENT_FILTER", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskDocumentFilter.text"),
Arrays.asList(".doc", ".docx", ".pdf", ".xls", ".rtf", ".txt")),
TSK_EXECUTABLE_FILTER(3, "TSK_EXECUTABLE_FILTER",
Arrays.asList(".doc", ".docx", ".pdf", ".xls", ".rtf", ".txt")), //NON-NLS
TSK_EXECUTABLE_FILTER(3, "TSK_EXECUTABLE_FILTER", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.tskExecFilter.text"),
Arrays.asList(".exe", ".dll", ".bat", ".cmd", ".com"));
Arrays.asList(".exe", ".dll", ".bat", ".cmd", ".com")); //NON-NLS
private int id;
private String name;
@ -92,21 +92,21 @@ import org.sleuthkit.datamodel.SleuthkitCase;
// document sub-node filters
public enum DocumentFilter implements AutopsyVisitableItem,SearchFilterInterface {
AUT_DOC_HTML(0, "AUT_DOC_HTML",
AUT_DOC_HTML(0, "AUT_DOC_HTML", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocHtmlFilter.text"),
Arrays.asList(".htm", ".html")),
AUT_DOC_OFFICE(1, "AUT_DOC_OFFICE",
Arrays.asList(".htm", ".html")), //NON-NLS
AUT_DOC_OFFICE(1, "AUT_DOC_OFFICE", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocOfficeFilter.text"),
Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx")),
AUT_DOC_PDF(2, "AUT_DOC_PDF",
Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx")), //NON-NLS
AUT_DOC_PDF(2, "AUT_DOC_PDF", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autoDocPdfFilter.text"),
Arrays.asList(".pdf")),
AUT_DOC_TXT(3, "AUT_DOC_TXT",
Arrays.asList(".pdf")), //NON-NLS
AUT_DOC_TXT(3, "AUT_DOC_TXT", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocTxtFilter.text"),
Arrays.asList(".txt")),
AUT_DOC_RTF(4, "AUT_DOC_RTF",
Arrays.asList(".txt")), //NON-NLS
AUT_DOC_RTF(4, "AUT_DOC_RTF", //NON-NLS
NbBundle.getMessage(FileTypeExtensionFilters.class, "FileTypeExtensionFilters.autDocRtfFilter.text"),
Arrays.asList(".rtf"));
Arrays.asList(".rtf")); //NON-NLS
private int id;
private String name;
@ -149,11 +149,11 @@ import org.sleuthkit.datamodel.SleuthkitCase;
// executable sub-node filters
public enum ExecutableFilter implements AutopsyVisitableItem,SearchFilterInterface {
ExecutableFilter_EXE(0, "ExecutableFilter_EXE", ".exe", Arrays.asList(".exe")),
ExecutableFilter_DLL(1, "ExecutableFilter_DLL", ".dll", Arrays.asList(".dll")),
ExecutableFilter_BAT(2, "ExecutableFilter_BAT", ".bat", Arrays.asList(".bat")),
ExecutableFilter_CMD(3, "ExecutableFilter_CMD", ".cmd", Arrays.asList(".cmd")),
ExecutableFilter_COM(4, "ExecutableFilter_COM", ".com", Arrays.asList(".com"));
ExecutableFilter_EXE(0, "ExecutableFilter_EXE", ".exe", Arrays.asList(".exe")), //NON-NLS
ExecutableFilter_DLL(1, "ExecutableFilter_DLL", ".dll", Arrays.asList(".dll")), //NON-NLS
ExecutableFilter_BAT(2, "ExecutableFilter_BAT", ".bat", Arrays.asList(".bat")), //NON-NLS
ExecutableFilter_CMD(3, "ExecutableFilter_CMD", ".cmd", Arrays.asList(".cmd")), //NON-NLS
ExecutableFilter_COM(4, "ExecutableFilter_COM", ".com", Arrays.asList(".com")); //NON-NLS
private int id;
private String name;

View File

@ -26,17 +26,17 @@ import java.util.List;
* and 'getters' to obtain them.
*/
public class FileTypeExtensions {
private final static List<String> IMAGE_EXTENSIONS = Arrays.asList(".jpg", ".jpeg", ".png", ".psd", ".nef", ".tiff", ".bmp");
private final static List<String> VIDEO_EXTENSIONS = Arrays.asList(".aaf", ".3gp", ".asf", ".avi", ".m1v", ".m2v",
".m4v", ".mp4", ".mov", ".mpeg", ".mpg", ".mpe", ".mp4", ".rm", ".wmv", ".mpv", ".flv", ".swf");
private final static List<String> AUDIO_EXTENSIONS = Arrays.asList(".aiff", ".aif", ".flac", ".wav", ".m4a", ".ape",
".wma", ".mp2", ".mp1", ".mp3", ".aac", ".mp4", ".m4p", ".m1a", ".m2a", ".m4r", ".mpa", ".m3u", ".mid", ".midi", ".ogg");
private final static List<String> DOCUMENT_EXTENSIONS = Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx");
private final static List<String> EXECUTABLE_EXTENSIONS = Arrays.asList(".exe", ".msi", ".cmd", ".com", ".bat", ".reg", ".scr", ".dll", ".ini");
private final static List<String> TEXT_EXTENSIONS = Arrays.asList(".txt", ".rtf", ".log", ".text", ".xml");
private final static List<String> WEB_EXTENSIONS = Arrays.asList(".html", ".htm", ".css", ".js", ".php", ".aspx");
private final static List<String> PDF_EXTENSIONS = Arrays.asList(".pdf");
private final static List<String> ARCHIVE_EXTENSIONS = Arrays.asList(".zip", ".rar", ".7zip", ".7z", ".arj", ".tar", ".gzip", ".bzip", ".bzip2", ".cab", ".jar", ".cpio", ".ar", ".gz", ".tgz");
private final static List<String> IMAGE_EXTENSIONS = Arrays.asList(".jpg", ".jpeg", ".png", ".psd", ".nef", ".tiff", ".bmp"); //NON-NLS
private final static List<String> VIDEO_EXTENSIONS = Arrays.asList(".aaf", ".3gp", ".asf", ".avi", ".m1v", ".m2v", //NON-NLS
".m4v", ".mp4", ".mov", ".mpeg", ".mpg", ".mpe", ".mp4", ".rm", ".wmv", ".mpv", ".flv", ".swf"); //NON-NLS
private final static List<String> AUDIO_EXTENSIONS = Arrays.asList(".aiff", ".aif", ".flac", ".wav", ".m4a", ".ape", //NON-NLS
".wma", ".mp2", ".mp1", ".mp3", ".aac", ".mp4", ".m4p", ".m1a", ".m2a", ".m4r", ".mpa", ".m3u", ".mid", ".midi", ".ogg"); //NON-NLS
private final static List<String> DOCUMENT_EXTENSIONS = Arrays.asList(".doc", ".docx", ".odt", ".xls", ".xlsx", ".ppt", ".pptx"); //NON-NLS
private final static List<String> EXECUTABLE_EXTENSIONS = Arrays.asList(".exe", ".msi", ".cmd", ".com", ".bat", ".reg", ".scr", ".dll", ".ini"); //NON-NLS
private final static List<String> TEXT_EXTENSIONS = Arrays.asList(".txt", ".rtf", ".log", ".text", ".xml"); //NON-NLS
private final static List<String> WEB_EXTENSIONS = Arrays.asList(".html", ".htm", ".css", ".js", ".php", ".aspx"); //NON-NLS
private final static List<String> PDF_EXTENSIONS = Arrays.asList(".pdf"); //NON-NLS
private final static List<String> ARCHIVE_EXTENSIONS = Arrays.asList(".zip", ".rar", ".7zip", ".7z", ".arj", ".tar", ".gzip", ".bzip", ".bzip2", ".cab", ".jar", ".cpio", ".ar", ".gz", ".tgz"); //NON-NLS
public static List<String> getImageExtensions() {
return IMAGE_EXTENSIONS;

Some files were not shown because too many files have changed in this diff Show More