Source:
<code>private static void doCaseChange(Case toChangeTo) { logger.log(Level.INFO, "Changing Case to: {0}", toChangeTo); if (toChangeTo != null) { Case.clearTempFolder(); checkSubFolders(toChangeTo); if (RuntimeProperties.coreComponentsAreActive()) { CallableSystemAction.get(AddImageAction.class).setEnabled(true); CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); CallableSystemAction.get(OpenTimelineAction.class).setEnabled(true); <START> if (toChangeTo.hasData()) { <END> SwingUtilities.invokeLater(() -> { CoreComponentControl.openCoreWindows(); }); } else { SwingUtilities.invokeLater(() -> { CoreComponentControl.closeCoreWindows(); }); } } if (RuntimeProperties.coreComponentsAreActive()) { SwingUtilities.invokeLater(() -> { updateMainWindowTitle(currentCase.getName()); }); } else { SwingUtilities.invokeLater(() -> { Frame f = WindowManager.getDefault().getMainWindow(); f.setTitle(Case.getAppName()); }); } } else { if (RuntimeProperties.coreComponentsAreActive()) { SwingUtilities.invokeLater(() -> { CoreComponentControl.closeCoreWindows(); CallableSystemAction.get(AddImageAction.class).setEnabled(false); CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); CallableSystemAction.get(OpenTimelineAction.class).setEnabled(false); }); } SwingUtilities.invokeLater(() -> { MessageNotifyUtil.Notify.clear(); }); SwingUtilities.invokeLater(() -> { Frame f = WindowManager.getDefault().getMainWindow(); f.setTitle(Case.getAppName()); }); System.gc(); System.gc(); } logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo()); }</code><technical_language>this, strange enabling of actions is dispatched EDT queue SwingUtilities.invokeLater. Please do so, for case closed branch of conditional</technical_language>

Target:
private static void doCaseChange(Case toChangeTo) { logger.log(Level.INFO, "Changing Case to: {0}", toChangeTo); if (toChangeTo != null) { Case.clearTempFolder(); checkSubFolders(toChangeTo); if (RuntimeProperties.coreComponentsAreActive()) { SwingUtilities.invokeLater(() -> { CallableSystemAction.get(AddImageAction.class).setEnabled(true); CallableSystemAction.get(CaseCloseAction.class).setEnabled(true); CallableSystemAction.get(CasePropertiesAction.class).setEnabled(true); CallableSystemAction.get(CaseDeleteAction.class).setEnabled(true); CallableSystemAction.get(OpenTimelineAction.class).setEnabled(true); if (toChangeTo.hasData()) { CoreComponentControl.openCoreWindows(); } else { CoreComponentControl.closeCoreWindows(); } }); updateMainWindowTitle(currentCase.getName()); } else { SwingUtilities.invokeLater(() -> { Frame f = WindowManager.getDefault().getMainWindow(); f.setTitle(Case.getAppName()); }); } } else { SwingUtilities.invokeLater(() -> { if (RuntimeProperties.coreComponentsAreActive()) { CoreComponentControl.closeCoreWindows(); CallableSystemAction.get(AddImageAction.class).setEnabled(false); CallableSystemAction.get(CaseCloseAction.class).setEnabled(false); CallableSystemAction.get(CasePropertiesAction.class).setEnabled(false); CallableSystemAction.get(CaseDeleteAction.class).setEnabled(false); CallableSystemAction.get(OpenTimelineAction.class).setEnabled(false); } MessageNotifyUtil.Notify.clear(); Frame f = WindowManager.getDefault().getMainWindow(); f.setTitle(Case.getAppName()); }); System.gc(); System.gc(); } logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo()); }