From 5e93f16b5d1b9a1cd101db1934909693af43b639 Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Wed, 31 Mar 2021 16:47:50 -0400 Subject: [PATCH 1/2] Fixed OsAccountDataPanel NPE --- .../autopsy/contentviewers/osaccount/OsAccountDataPanel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java index 2117b86cc6..d27a61bc13 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java @@ -50,6 +50,7 @@ import org.sleuthkit.datamodel.OsAccountInstance; import org.sleuthkit.datamodel.OsAccountManager; import org.sleuthkit.datamodel.OsAccountRealm; import org.sleuthkit.datamodel.SleuthkitCase; +import org.sleuthkit.datamodel.TskCoreException; /** * Panel for displaying the properties of an OsAccount. @@ -385,12 +386,13 @@ public class OsAccountDataPanel extends JPanel { Map instanceMap = new HashMap<>(); SleuthkitCase skCase = Case.getCurrentCase().getSleuthkitCase(); OsAccountManager osAccountManager = skCase.getOsAccountManager(); - OsAccountRealm realm = skCase.getOsAccountRealmManager().getRealmById(account.getRealmId()); if(account == null) { account = osAccountManager.getOsAccountByObjectId(accountId); } + OsAccountRealm realm = skCase.getOsAccountRealmManager().getRealmById(account.getRealmId()); + List hosts = osAccountManager.getHosts(account); List attributeList = account.getOsAccountAttributes(); From eee5b8fde699fb2d4c0b9a452b5cea4735e91c84 Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Thu, 1 Apr 2021 10:51:29 -0400 Subject: [PATCH 2/2] Removed unused import --- .../autopsy/contentviewers/osaccount/OsAccountDataPanel.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java index d27a61bc13..c1966cb067 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/osaccount/OsAccountDataPanel.java @@ -50,7 +50,6 @@ import org.sleuthkit.datamodel.OsAccountInstance; import org.sleuthkit.datamodel.OsAccountManager; import org.sleuthkit.datamodel.OsAccountRealm; import org.sleuthkit.datamodel.SleuthkitCase; -import org.sleuthkit.datamodel.TskCoreException; /** * Panel for displaying the properties of an OsAccount.