remove finally blocks

This commit is contained in:
Karl Mortensen 2015-10-22 16:37:21 -04:00
parent 4e2659e810
commit f365d5d28f
5 changed files with 1 additions and 40 deletions

View File

@ -323,7 +323,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
Case oldCase = Case.currentCase; Case oldCase = Case.currentCase;
Case.currentCase = null; Case.currentCase = null;
if (oldCase != null) { if (oldCase != null) {
/* KDM I think we want this one....*/
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
}); });
@ -375,7 +374,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
} else { } else {
Logger.setLogDirectory(PlatformUtil.getLogDirectory()); Logger.setLogDirectory(PlatformUtil.getLogDirectory());
} }
/* KDM I think we want this one too. */
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}); });
@ -471,13 +469,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
throw new CaseActionException( throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex);
} /* KDM from RC
finally {
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
});
} }
*/
/** /**
* Two-stage initialization to avoid leaking reference to "this" in * Two-stage initialization to avoid leaking reference to "this" in
@ -656,13 +648,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
}); });
throw new CaseActionException(NbBundle.getMessage(Case.class, "CaseOpenException.DatabaseSettingsIssue") + " " + ex.getMessage(), ex); //NON-NLS throw new CaseActionException(NbBundle.getMessage(Case.class, "CaseOpenException.DatabaseSettingsIssue") + " " + ex.getMessage(), ex); //NON-NLS
} }
/* KDM from RC
finally {
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
});
}
*/
} }
static Map<Long, String> getImagePaths(SleuthkitCase db) { //TODO: clean this up static Map<Long, String> getImagePaths(SleuthkitCase db) { //TODO: clean this up

View File

@ -102,13 +102,6 @@ public final class CaseOpenAction implements ActionListener {
} }
}); });
} }
/* KDM from RC
finally {
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
});
}
*/
}).start(); }).start();
} }
} }

View File

@ -140,9 +140,6 @@ final class NewCaseWizardAction extends CallableSystemAction {
}); });
doFailedCaseCleanup(wizardDescriptor); doFailedCaseCleanup(wizardDescriptor);
} }
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
});
} }
}.execute(); }.execute();
} else { } else {

View File

@ -229,13 +229,6 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
} }
}); });
} }
/* KDM from RC
finally {
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
});
}
*/
}).start(); }).start();
} }
} }

View File

@ -89,13 +89,6 @@ class RecentItems implements ActionListener {
} }
}); });
} }
/* KDM from RC
finally {
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
});
}
*/
}).start(); }).start();
} }
} }