Skip to content

Commit

Permalink
fixed aip corruption risk assessment plugin issue responsible to not …
Browse files Browse the repository at this point in the history
…mitigate past similar unmitigated incidences #1281
  • Loading branch information
nunovieira220 committed Aug 9, 2018
1 parent f973a2c commit 2d2d774
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*/

public class IterableIndexResult<T extends IsIndexed> implements CloseableIterable<T> {

private static int PAGE_SIZE = -1;
private static int RETRIES = -1;
private static int SLEEP_BETWEEN_RETRIES = -1;
Expand All @@ -39,9 +38,7 @@ public class IterableIndexResult<T extends IsIndexed> implements CloseableIterab
private final IndexResultIterator<T> iterator;

public IterableIndexResult(final SolrClient solrClient, final Class<T> returnClass, final Filter filter,
final User user, final boolean justActive, final List<String> fieldsToReturn)
throws GenericException, RequestNotValidException {

final User user, final boolean justActive, final List<String> fieldsToReturn) {
iterator = new IndexResultIterator<>(solrClient, returnClass, filter, user, justActive, fieldsToReturn);

if (PAGE_SIZE > 0) {
Expand All @@ -59,7 +56,6 @@ public IterableIndexResult(final SolrClient solrClient, final Class<T> returnCla
if (HISTOGRAM != null) {
iterator.setHistogram(HISTOGRAM);
}

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.roda.core.data.v2.LiteOptionalWithCause;
import org.roda.core.data.v2.common.OptionalWithCause;
import org.roda.core.data.v2.index.IndexResult;
import org.roda.core.data.v2.index.filter.EmptyKeyFilterParameter;
import org.roda.core.data.v2.index.filter.Filter;
import org.roda.core.data.v2.index.filter.SimpleFilterParameter;
import org.roda.core.data.v2.index.sort.Sorter;
Expand Down Expand Up @@ -303,9 +304,11 @@ private List<RiskIncidence> getUnmitigatedIncidences(IndexService index, String
filter.add(new SimpleFilterParameter(RodaConstants.RISK_INCIDENCE_REPRESENTATION_ID, representationId));
}

if (filePath != null) {
if (filePath != null && !filePath.isEmpty()) {
filter.add(new SimpleFilterParameter(RodaConstants.RISK_INCIDENCE_FILE_PATH_COMPUTED,
StringUtils.join(filePath, RodaConstants.RISK_INCIDENCE_FILE_PATH_COMPUTED_SEPARATOR)));
} else {
filter.add(new EmptyKeyFilterParameter(RodaConstants.RISK_INCIDENCE_FILE_PATH_COMPUTED));
}

if (fileId != null) {
Expand Down

0 comments on commit 2d2d774

Please sign in to comment.