diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/MessageAccountPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/MessageAccountPanel.java index 8cf4337163..fbf1ada856 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/MessageAccountPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/MessageAccountPanel.java @@ -586,6 +586,7 @@ final class MessageAccountPanel extends JPanel { // Set up each matching account. We don't know what type of account we have, so check all the types to // find any matches. try { + boolean showErrorMessage = true; for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) { try { // Try to load any matching accounts of this type. Throws an InvalidAccountIDException if the account is the @@ -593,13 +594,15 @@ final class MessageAccountPanel extends JPanel { CentralRepoAccount account = CentralRepository.getInstance().getAccount(type, accountContainer.getAccount().getTypeSpecificID()); if (account != null) { personaPanel.addAccount(account, Bundle.MessageAccountPanel_account_justification(), Persona.Confidence.HIGH); - } else { - createPersonaDialog.setStartupPopupMessage(Bundle.MessageAccountPanel_id_not_found_in_cr(accountContainer.getAccount().getTypeSpecificID())); - } + showErrorMessage = false; + } } catch (InvalidAccountIDException ex2) { // These are expected when the account identifier doesn't match the format of the account type. } } + if(showErrorMessage) { + createPersonaDialog.setStartupPopupMessage(Bundle.MessageAccountPanel_id_not_found_in_cr(accountContainer.getAccount().getTypeSpecificID())); + } } catch (CentralRepoException ex) { logger.log(Level.SEVERE, "Error looking up account types in the central repository", ex); } diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/PersonaAccountFetcher.java b/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/PersonaAccountFetcher.java index 0601c0893d..020a2645b6 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/PersonaAccountFetcher.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/artifactviewers/PersonaAccountFetcher.java @@ -200,6 +200,7 @@ class PersonaAccountFetcher extends SwingWorker> // Set up each matching account. We don't know what type of account we have, so check all the types to // find any matches. try { + boolean showErrorMessage = true; for (CentralRepoAccount.CentralRepoAccountType type : CentralRepository.getInstance().getAllAccountTypes()) { try { // Try to load any matching accounts of this type. Throws an InvalidAccountIDException if the account is the @@ -207,16 +208,17 @@ class PersonaAccountFetcher extends SwingWorker> CentralRepoAccount account = CentralRepository.getInstance().getAccount(type, personaSearcherData.getAccountIdentifer()); if (account != null) { personaPanel.addAccount(account, Bundle.PersonaAccountFetcher_account_justification(), Persona.Confidence.HIGH); + showErrorMessage = false; } - if((personaSearcherData.getAccountIdentifer() != null && - !personaSearcherData.getAccountIdentifer().isEmpty()) && account == null) { - dialog.setStartupPopupMessage(Bundle.PersonaAccountFetcher_not_account_in_cr(personaSearcherData.getAccountIdentifer())); - } } catch (InvalidAccountIDException ex2) { // These are expected when the account identifier doesn't match the format of the account type. } } + if ((personaSearcherData.getAccountIdentifer() != null + && !personaSearcherData.getAccountIdentifer().isEmpty()) && showErrorMessage) { + dialog.setStartupPopupMessage(Bundle.PersonaAccountFetcher_not_account_in_cr(personaSearcherData.getAccountIdentifer())); + } } catch (CentralRepoException ex) { logger.log(Level.SEVERE, "Error looking up account types in the central repository", ex); }