Addressed Codacy comments.

This commit is contained in:
Raman Arora 2020-06-08 16:25:55 -04:00
parent 417105694f
commit 1844ab646f
2 changed files with 12 additions and 16 deletions

View File

@ -104,10 +104,7 @@ public final class CentralRepoAccount {
if (this.correlationTypeId != other.getCorrelationTypeId()) {
return false;
}
if (!Objects.equals(this.acctType, other.getAcctType())) {
return false;
}
return true;
return Objects.equals(this.acctType, other.getAcctType());
}
}
@ -173,10 +170,7 @@ public final class CentralRepoAccount {
if (!Objects.equals(this.typeSpecificIdentifier, other.getIdentifier())) {
return false;
}
if (!Objects.equals(this.accountType, other.getAccountType())) {
return false;
}
return true;
return Objects.equals(this.accountType, other.getAccountType());
}
/**

View File

@ -66,7 +66,7 @@ public class ContactArtifactViewer extends javax.swing.JPanel implements Artifac
private String contactName;
// A list of unique accounts matching the attributes of the contact artifact.
private final ArrayList<CentralRepoAccount> contactUniqueAccountsList = new ArrayList<>();
private final List<CentralRepoAccount> contactUniqueAccountsList = new ArrayList<>();
// A list of all unique personas and their account, found by searching on the
// account identifier attributes of the Contact artifact.
@ -588,7 +588,7 @@ public class ContactArtifactViewer extends javax.swing.JPanel implements Artifac
private class ContactPersonaSearcherTask extends SwingWorker<Map<Persona, ArrayList<CentralRepoAccount>>, Void> {
private final List<BlackboardAttribute> accountAttributesList;
private final ArrayList<CentralRepoAccount> uniqueAccountsList = new ArrayList<>();
private final List<CentralRepoAccount> uniqueAccountsList = new ArrayList<>();
ContactPersonaSearcherTask(List<BlackboardAttribute> accountAttributesList) {
@ -713,16 +713,18 @@ public class ContactArtifactViewer extends javax.swing.JPanel implements Artifac
// Pre populate the persona name and accounts if we have them.
PersonaDetailsPanel personaPanel = createPersonaDialog.getDetailsPanel();
if (contactName != null) {
// TBD: set persona name
//personaPanel.setPersonaName(contactName);
}
// if (contactName != null) {
// personaPanel.setPersonaName(contactName);
// }
// pass the list of accounts to the dialog
for (CentralRepoAccount account: contactUniqueAccountsList) {
boolean result = personaPanel.addAccount(account, "Found in Contact artifact.", Persona.Confidence.UNKNOWN);
personaPanel.addAccount(account, "Account found in Contact artifact.", Persona.Confidence.UNKNOWN);
}
createPersonaDialog.getDetailsPanel().revalidate();
createPersonaDialog.revalidate();
}
}