From 7daab901b3f5111a40262915e554a85a6e3bd7f8 Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Thu, 9 Aug 2018 08:40:18 -0600 Subject: [PATCH] simplify some code --- .../autopsy/commonfilesearch/CommonAttributePanel.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonAttributePanel.java b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonAttributePanel.java index 2da355d8be..4733756ca9 100644 --- a/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonAttributePanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonAttributePanel.java @@ -87,12 +87,14 @@ public final class CommonAttributePanel extends javax.swing.JDialog { private static boolean isEamDbAvailable() { try { - return (EamDb.isEnabled() && - EamDb.getInstance() != null && + final boolean conditions = EamDb.isEnabled() && + EamDb.getInstance() != null && EamDb.getInstance().getCases().size() > 1 && Case.isCaseOpen() && - Case.getCurrentCase() != null && - EamDb.getInstance().getCase(Case.getCurrentCase()) != null); + Case.getCurrentCase() != null && + EamDb.getInstance().getCase(Case.getCurrentCase()) != null; + + return conditions; } catch (EamDbException ex) { LOGGER.log(Level.SEVERE, "Unexpected exception while checking for EamDB enabled.", ex); }