From 90fc65d2bc79da0d2ae60f6374c85855331386f7 Mon Sep 17 00:00:00 2001 From: Raman Arora Date: Mon, 6 Jul 2020 15:22:33 -0400 Subject: [PATCH] Addressed Codacy comments. --- .../centralrepository/datamodel/CentralRepoAccount.java | 5 +++-- .../persona/CreatePersonaAccountDialog.java | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java index 6fcc8b7404..eb245db07e 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoAccount.java @@ -311,11 +311,12 @@ public final class CentralRepoAccount { * @throws InvalidAccountIDException If the account identifier is invalid. */ public static String normalizeAccountIdentifier(CentralRepoAccountType crAccountType, String accountIdentifier) throws InvalidAccountIDException { - String normalizedAccountIdentifier; - + if (StringUtils.isBlank(accountIdentifier)) { throw new InvalidAccountIDException("Account identifier is null or empty."); } + + String normalizedAccountIdentifier; try { if (crAccountType.getAcctType().equals(Account.Type.PHONE)) { normalizedAccountIdentifier = CorrelationAttributeNormalizer.normalizePhone(accountIdentifier); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java index c477faf24a..50a792b170 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/persona/CreatePersonaAccountDialog.java @@ -28,7 +28,6 @@ import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.ListCellRenderer; import javax.swing.SwingUtilities; -import org.openide.util.Exceptions; import org.openide.util.NbBundle.Messages; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount;