Merge branch '6770-Domain-Discovery-Thumbnail-API' into 6847-Hook-Up-Domain-UI-And-Thumbnailing

This commit is contained in:
U-BASIS\dsmyda 2020-09-16 14:19:03 -04:00
commit 39f8730ab1
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact;
*/
public class DomainSearchArtifactsCache {
private static final int MAXIMUM_CACHE_SIZE = 5;
private static final int MAXIMUM_CACHE_SIZE = 500;
private static final LoadingCache<DomainSearchArtifactsRequest, List<BlackboardArtifact>> cache
= CacheBuilder.newBuilder()
.maximumSize(MAXIMUM_CACHE_SIZE)
@ -49,7 +49,7 @@ public class DomainSearchArtifactsCache {
try {
return cache.get(request);
} catch (ExecutionException ex) {
throw new DiscoveryException("Error fetching artifacts from cache", ex.getCause());
throw new DiscoveryException("Error fetching artifacts from cache", ex);
}
}
}

View File

@ -49,7 +49,7 @@ public class DomainSearchArtifactsLoader extends CacheLoader<DomainSearchArtifac
final BlackboardAttribute tskDomain = artifact.getAttribute(TSK_DOMAIN);
final BlackboardAttribute tskUrl = artifact.getAttribute(TSK_URL);
if (tskDomain != null && tskDomain.getValueString().toLowerCase().equals(normalizedDomain)) {
if (tskDomain != null && tskDomain.getValueString().equalsIgnoreCase(normalizedDomain)) {
matchingDomainArtifacts.add(artifact);
} else if (tskUrl != null && tskUrl.getValueString().toLowerCase().contains(normalizedDomain)) {
matchingDomainArtifacts.add(artifact);

View File

@ -47,7 +47,7 @@ public class DomainSearchThumbnailCache {
try {
return cache.get(request);
} catch (ExecutionException ex) {
throw new DiscoveryException("Error fetching artifacts from cache", ex.getCause());
throw new DiscoveryException("Error fetching artifacts from cache", ex);
}
}
}