diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java index 774f6ea3e5493c631a57f10bf1406e38fcde9852..34cc943e34d471a1f050212171edbb67412a2472 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java @@ -365,7 +365,7 @@ public synchronized DrawableGroup removeFromGroup(GroupKey<?> groupKey, final Lo } else { //group == null // It may be that this was the last unanalyzed file in the group, so test // whether the group is now fully analyzed. - return popuplateIfAnalyzed(groupKey, null); + return populateIfAnalyzed(groupKey, null); } } @@ -574,7 +574,7 @@ synchronized private void addFileToGroup(DrawableGroup group, final GroupKey<?> * 'populateIfAnalyzed' will still not return a group and therefore * this method will never mark the group as unseen. */ - group = popuplateIfAnalyzed(groupKey, null); + group = populateIfAnalyzed(groupKey, null); } else { //if there is aleady a group that was previously deemed fully analyzed, then add this newly analyzed file to it. group.addFile(fileID); @@ -680,7 +680,7 @@ synchronized private void updateCurrentPathGroup(GroupKey<?> groupKey) { } else if (groupKey.getValue().toString().equalsIgnoreCase(this.currentPathGroup.getValue().toString()) == false) { // mark the last path group as analyzed getDrawableDB().markGroupAnalyzed(currentPathGroup); - popuplateIfAnalyzed(currentPathGroup, null); + populateIfAnalyzed(currentPathGroup, null); currentPathGroup = groupKey; } @@ -698,7 +698,7 @@ synchronized public void resetCurrentPathGroup() { try { if (currentPathGroup != null) { getDrawableDB().markGroupAnalyzed(currentPathGroup); - popuplateIfAnalyzed(currentPathGroup, null); + populateIfAnalyzed(currentPathGroup, null); currentPathGroup = null; } } catch (TskCoreException ex) { @@ -713,7 +713,7 @@ synchronized public void resetCurrentPathGroup() { * * @returns null if Group is not ready to be viewed */ - synchronized private DrawableGroup popuplateIfAnalyzed(GroupKey<?> groupKey, ReGroupTask<?> task) { + synchronized private DrawableGroup populateIfAnalyzed(GroupKey<?> groupKey, ReGroupTask<?> task) { /* * If this method call is part of a ReGroupTask and that task is * cancelled, no-op. @@ -735,7 +735,7 @@ synchronized private DrawableGroup popuplateIfAnalyzed(GroupKey<?> groupKey, ReG if (groupKey.getAttribute() != DrawableAttribute.PATH || getDrawableDB().isGroupAnalyzed(groupKey)) { Set<Long> fileIDs = getFileIDsInGroup(groupKey); - if (Objects.nonNull(fileIDs)) { + if (Objects.nonNull(fileIDs) && ! fileIDs.isEmpty()) { long examinerID = collaborativeModeProp.get() ? -1 : controller.getCaseDatabase().getCurrentExaminer().getId(); final boolean groupSeen = getDrawableDB().isGroupSeenByExaminer(groupKey, examinerID); @@ -866,7 +866,7 @@ protected Void call() throws Exception { p++; updateMessage(Bundle.ReGroupTask_displayTitle(groupBy.attrName.toString()) + valForDataSource.getValue()); updateProgress(p, valsByDataSource.size()); - popuplateIfAnalyzed(new GroupKey<>(groupBy, valForDataSource.getValue(), valForDataSource.getKey()), this); + populateIfAnalyzed(new GroupKey<>(groupBy, valForDataSource.getValue(), valForDataSource.getKey()), this); } Optional<DrawableGroup> viewedGroup