mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #4128 from millmanorama/1030-remove-synchronization
1030 - remove synchronized block
This commit is contained in:
commit
945c1b3ea4
@ -344,49 +344,48 @@ public final class ImageGalleryTopComponent extends TopComponent implements Expl
|
|||||||
+ "or no groups are fully analyzed but ingest is not running."})
|
+ "or no groups are fully analyzed but ingest is not running."})
|
||||||
private void checkForGroups() {
|
private void checkForGroups() {
|
||||||
GroupManager groupManager = controller.getGroupManager();
|
GroupManager groupManager = controller.getGroupManager();
|
||||||
synchronized (groupManager) {
|
|
||||||
if (isNotEmpty(groupManager.getAnalyzedGroups())) {
|
|
||||||
clearNotification();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IngestManager.getInstance().isIngestRunning()) {
|
if (isNotEmpty(groupManager.getAnalyzedGroups())) {
|
||||||
|
clearNotification();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IngestManager.getInstance().isIngestRunning()) {
|
||||||
|
if (controller.isListeningEnabled()) {
|
||||||
|
replaceNotification(centralStack,
|
||||||
|
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg2(),
|
||||||
|
new ProgressIndicator()));
|
||||||
|
} else {
|
||||||
|
replaceNotification(fullUIStack,
|
||||||
|
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg1()));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (controller.getDBTasksQueueSizeProperty().get() > 0) {
|
||||||
|
replaceNotification(fullUIStack,
|
||||||
|
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg3(),
|
||||||
|
new ProgressIndicator()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (controller.getDatabase().countAllFiles() <= 0) {
|
||||||
|
// there are no files in db
|
||||||
if (controller.isListeningEnabled()) {
|
if (controller.isListeningEnabled()) {
|
||||||
replaceNotification(centralStack,
|
replaceNotification(fullUIStack,
|
||||||
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg2(),
|
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg5()));
|
||||||
new ProgressIndicator()));
|
|
||||||
} else {
|
} else {
|
||||||
replaceNotification(fullUIStack,
|
replaceNotification(fullUIStack,
|
||||||
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg1()));
|
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg4()));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (controller.getDBTasksQueueSizeProperty().get() > 0) {
|
} catch (TskCoreException tskCoreException) {
|
||||||
replaceNotification(fullUIStack,
|
logger.log(Level.SEVERE, "Error counting files in the database.", tskCoreException);
|
||||||
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg3(),
|
}
|
||||||
new ProgressIndicator()));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (controller.getDatabase().countAllFiles() <= 0) {
|
|
||||||
// there are no files in db
|
|
||||||
if (controller.isListeningEnabled()) {
|
|
||||||
replaceNotification(fullUIStack,
|
|
||||||
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg5()));
|
|
||||||
} else {
|
|
||||||
replaceNotification(fullUIStack,
|
|
||||||
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg4()));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} catch (TskCoreException tskCoreException) {
|
|
||||||
logger.log(Level.SEVERE, "Error counting files in the database.", tskCoreException);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (false == groupManager.isRegrouping()) {
|
if (false == groupManager.isRegrouping()) {
|
||||||
replaceNotification(centralStack,
|
replaceNotification(centralStack,
|
||||||
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg6()));
|
new NoGroupsDialog(Bundle.ImageGalleryController_noGroupsDlg_msg6()));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,9 +232,8 @@ public class GroupManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRegrouping() {
|
public boolean isRegrouping() {
|
||||||
Worker.State state = regrouper.getState();
|
|
||||||
return Arrays.asList(Worker.State.READY, Worker.State.RUNNING, Worker.State.SCHEDULED)
|
return Arrays.asList(Worker.State.READY, Worker.State.RUNNING, Worker.State.SCHEDULED)
|
||||||
.contains(state);
|
.contains(regrouper.getState());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyObjectProperty<Worker.State> reGroupingState() {
|
public ReadOnlyObjectProperty<Worker.State> reGroupingState() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user