Final format checking

This commit is contained in:
Kelly Kelly 2021-05-14 13:52:55 -04:00
parent e842001237
commit 2ccf455568
3 changed files with 15 additions and 14 deletions

View File

@ -100,7 +100,7 @@ class OtherOccurrenceOneTypeWorker extends SwingWorker<OneTypeData, Void> {
&& (!StringUtils.isBlank(dataSourceName) && artifactInstance.getCorrelationDataSource().getName().equals(dataSourceName)) && (!StringUtils.isBlank(dataSourceName) && artifactInstance.getCorrelationDataSource().getName().equals(dataSourceName))
&& (!StringUtils.isBlank(deviceId) && artifactInstance.getCorrelationDataSource().getDeviceID().equals(deviceId)) && (!StringUtils.isBlank(deviceId) && artifactInstance.getCorrelationDataSource().getDeviceID().equals(deviceId))
&& (file != null && artifactInstance.getFilePath().equalsIgnoreCase(file.getParentPath() + file.getName()))) { && (file != null && artifactInstance.getFilePath().equalsIgnoreCase(file.getParentPath() + file.getName()))) {
continue; continue;
} }
correlationAttributesToAdd.add(artifactInstance); correlationAttributesToAdd.add(artifactInstance);

View File

@ -380,11 +380,12 @@ class OtherOccurrenceUtilities {
/** /**
* Create a cvs file of occurrences for the given parameters. * Create a cvs file of occurrences for the given parameters.
* *
* @param destFile Output file for the csv data. * @param destFile Output file for the csv data.
* @param abstractFile Source file. * @param abstractFile Source file.
* @param correlationAttList List of correclationAttributeInstances, should not be null. * @param correlationAttList List of correclationAttributeInstances, should
* @param dataSourceName Name of the data source. * not be null.
* @param deviceId Device id. * @param dataSourceName Name of the data source.
* @param deviceId Device id.
* *
* @throws IOException * @throws IOException
*/ */

View File

@ -174,7 +174,7 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
*/ */
private void showCommonalityDetails() { private void showCommonalityDetails() {
if (correlationAttributes.isEmpty()) { if (correlationAttributes.isEmpty()) {
JOptionPane.showConfirmDialog(showCommonalityMenuItem, JOptionPane.showConfirmDialog(OtherOccurrencesPanel.this,
Bundle.OtherOccurrencesPanel_correlatedArtifacts_isEmpty(), Bundle.OtherOccurrencesPanel_correlatedArtifacts_isEmpty(),
Bundle.OtherOccurrencesPanel_correlatedArtifacts_title(), Bundle.OtherOccurrencesPanel_correlatedArtifacts_title(),
DEFAULT_OPTION, PLAIN_MESSAGE); DEFAULT_OPTION, PLAIN_MESSAGE);
@ -196,14 +196,14 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
} }
} }
this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
JOptionPane.showConfirmDialog(showCommonalityMenuItem, JOptionPane.showConfirmDialog(OtherOccurrencesPanel.this,
msg.toString(), msg.toString(),
Bundle.OtherOccurrencesPanel_correlatedArtifacts_title(), Bundle.OtherOccurrencesPanel_correlatedArtifacts_title(),
DEFAULT_OPTION, PLAIN_MESSAGE); DEFAULT_OPTION, PLAIN_MESSAGE);
} catch (CentralRepoException ex) { } catch (CentralRepoException ex) {
this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
logger.log(Level.SEVERE, "Error getting commonality details.", ex); logger.log(Level.SEVERE, "Error getting commonality details.", ex);
JOptionPane.showConfirmDialog(showCommonalityMenuItem, JOptionPane.showConfirmDialog(OtherOccurrencesPanel.this,
Bundle.OtherOccurrencesPanel_correlatedArtifacts_failed(), Bundle.OtherOccurrencesPanel_correlatedArtifacts_failed(),
Bundle.OtherOccurrencesPanel_correlatedArtifacts_title(), Bundle.OtherOccurrencesPanel_correlatedArtifacts_title(),
DEFAULT_OPTION, ERROR_MESSAGE); DEFAULT_OPTION, ERROR_MESSAGE);
@ -245,7 +245,7 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
} catch (CentralRepoException ex) { } catch (CentralRepoException ex) {
logger.log(Level.SEVERE, "Error loading case details", ex); logger.log(Level.SEVERE, "Error loading case details", ex);
} finally { } finally {
JOptionPane.showConfirmDialog(showCaseDetailsMenuItem, JOptionPane.showConfirmDialog(OtherOccurrencesPanel.this,
details, details,
caseDisplayName, caseDisplayName,
DEFAULT_OPTION, PLAIN_MESSAGE); DEFAULT_OPTION, PLAIN_MESSAGE);
@ -392,7 +392,7 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
*/ */
private void updateOnCaseSelection() { private void updateOnCaseSelection() {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try{ try {
int[] selectedCaseIndexes = casesTable.getSelectedRows(); int[] selectedCaseIndexes = casesTable.getSelectedRows();
dataSourcesTableModel.clearTable(); dataSourcesTableModel.clearTable();
filesTableModel.clearTable(); filesTableModel.clearTable();
@ -446,7 +446,7 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
*/ */
private void updateOnDataSourceSelection() { private void updateOnDataSourceSelection() {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try{ try {
int[] selectedDataSources = dataSourcesTable.getSelectedRows(); int[] selectedDataSources = dataSourcesTable.getSelectedRows();
filesTableModel.clearTable(); filesTableModel.clearTable();
for (CorrelationAttributeInstance corAttr : correlationAttributes) { for (CorrelationAttributeInstance corAttr : correlationAttributes) {
@ -477,7 +477,7 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
filesTable.setRowSelectionInterval(0, 0); filesTable.setRowSelectionInterval(0, 0);
} }
} finally { } finally {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} }
} }
@ -487,7 +487,7 @@ public final class OtherOccurrencesPanel extends javax.swing.JPanel {
*/ */
private void updateOnFileSelection() { private void updateOnFileSelection() {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try{ try {
if (filesTable.getSelectedRowCount() == 1) { if (filesTable.getSelectedRowCount() == 1) {
//if there is one file selected update the deatils to show the data for that file //if there is one file selected update the deatils to show the data for that file
occurrencePanel = new OccurrencePanel(filesTableModel.getListOfNodesForFile(filesTable.convertRowIndexToModel(filesTable.getSelectedRow()))); occurrencePanel = new OccurrencePanel(filesTableModel.getListOfNodesForFile(filesTable.convertRowIndexToModel(filesTable.getSelectedRow())));