diff --git a/iped-app/src/main/java/iped/app/ui/CaseSearcherFilter.java b/iped-app/src/main/java/iped/app/ui/CaseSearcherFilter.java index ffc8bb7708..a1792b07c3 100644 --- a/iped-app/src/main/java/iped/app/ui/CaseSearcherFilter.java +++ b/iped-app/src/main/java/iped/app/ui/CaseSearcherFilter.java @@ -57,7 +57,7 @@ public class CaseSearcherFilter extends CancelableWorker listeners = new ArrayList(); RoaringBitmap[] unionsArray; RoaringBitmap[] excludeUnionsArray; - + public static SoftReference allItemsCache; private static IPEDSource ipedCase; @@ -216,7 +216,7 @@ public MultiSearchResult doInBackground() { result.setIPEDSource(ipedCase); } } - + } catch (Throwable e) { if (!(e instanceof CancellationException)) { e.printStackTrace(); @@ -240,11 +240,11 @@ private void applyFilterer(IResultSetFilterer iRSFilterer, MultiSearchResult res if (rsFilter != null) { if (rsFilter instanceof IBitmapFilter) {// if the filter exposes a internal bitmap - applyBitmapFilter((IBitmapFilter)rsFilter); + applyBitmapFilter((IBitmapFilter) rsFilter); } else { RoaringBitmap[] cachedBitmaps = filterManager.getCachedBitmaps((IResultSetFilter) rsFilter); if (cachedBitmaps != null) { // if filtermanager returned a cached bitmap - applyBitmapFilter(cachedBitmaps); + applyBitmapFilter(cachedBitmaps); } else { MultiSearchResult newresult = filterManager.applyFilter((IResultSetFilter) rsFilter, result); if (newresult != result) { @@ -256,10 +256,10 @@ private void applyFilterer(IResultSetFilterer iRSFilterer, MultiSearchResult res } } } - } + } - private void applyBitmapFilter(RoaringBitmap[] cachedBitmaps) { - RoaringBitmap[] lunionsArray = result.getCasesBitSets((IPEDMultiSource) ipedCase); + private void applyBitmapFilter(RoaringBitmap[] cachedBitmaps) { + RoaringBitmap[] lunionsArray = result.getCasesBitSets((IPEDMultiSource) ipedCase); for (int i = 0; i < unionsArray.length; i++) { lunionsArray[i].and(cachedBitmaps[i]); } @@ -270,10 +270,10 @@ private void applyBitmapFilter(RoaringBitmap[] cachedBitmaps) { result = newresult; result.setIPEDSource(ipedCase); } - } + } - private void applyBitmapFilter(IBitmapFilter rsFilter) { - RoaringBitmap[] lunionsArray = result.getCasesBitSets((IPEDMultiSource) ipedCase); + private void applyBitmapFilter(IBitmapFilter rsFilter) { + RoaringBitmap[] lunionsArray = result.getCasesBitSets((IPEDMultiSource) ipedCase); for (int i = 0; i < lunionsArray.length; i++) { if (rsFilter.isToFilterOut()) { lunionsArray[i].andNot(((IBitmapFilter) rsFilter).getBitmap()[i]); @@ -288,9 +288,9 @@ private void applyBitmapFilter(IBitmapFilter rsFilter) { result = newresult; result.setIPEDSource(ipedCase); } - } + } - @Override + @Override public void done() { for (CaseSearchFilterListener caseSearchFilterListener : listeners) { if (isCancelled()) { @@ -376,6 +376,6 @@ public void addBitmapFilter(RoaringBitmap[] lunionsArray) { } else { unionsArray[i].and(lunionsArray[i]); } - } + } } } diff --git a/iped-engine/src/main/java/iped/engine/search/MultiSearchResult.java b/iped-engine/src/main/java/iped/engine/search/MultiSearchResult.java index b48f65efb3..3dd1843e21 100644 --- a/iped-engine/src/main/java/iped/engine/search/MultiSearchResult.java +++ b/iped-engine/src/main/java/iped/engine/search/MultiSearchResult.java @@ -233,17 +233,17 @@ public RoaringBitmap[] getCasesBitSets(IPEDMultiSource multiSource) { bitset.add(ids[i].getId()); } - } + } return clone(casesBitSet); } - private RoaringBitmap[] clone(RoaringBitmap[] casesBitSet2) { - RoaringBitmap[] lcasesBitSet = new RoaringBitmap[casesBitSet.length]; - for(int i=0; i