From af6fb2fceec93b2548602834999151f210f40749 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\zhaohui" Date: Wed, 25 Oct 2017 15:00:05 -0400 Subject: [PATCH] 3116: A more generic way to get account display name for all availabe account types. --- .../org/sleuthkit/autopsy/report/TableReportGenerator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java b/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java index ee435787aa..3df94c1d1c 100755 --- a/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java +++ b/Core/src/org/sleuthkit/autopsy/report/TableReportGenerator.java @@ -176,8 +176,11 @@ class TableReportGenerator { * compund name by appending a ":" and the account type. */ String accountDisplayname = accountType; - if (accountType != null && accountType.equals(Account.Type.CREDIT_CARD.name())) { - accountDisplayname = Account.Type.CREDIT_CARD.getDisplayName(); + for (Account.Type acct : Account.Type.values()) { + if (acct.equals(Account.Type.valueOf(accountType))) { + accountDisplayname = acct.getDisplayName(); + break; + } } final String compundDataTypeName = BlackboardArtifact.ARTIFACT_TYPE.TSK_ACCOUNT.getDisplayName() + ": " + accountDisplayname; writeTableForDataType(new ArrayList<>(groupedArtifacts.get(accountType)), type, compundDataTypeName, comment);