Fix some issues found by qodana (#2083)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
package org.eclipse.hawkbit.rest.json.model;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
@@ -74,7 +75,7 @@ public class ResponseList<T> extends RepresentationModel<ResponseList<T>> implem
|
||||
|
||||
@Override
|
||||
public boolean containsAll(final Collection<?> c) {
|
||||
return content.containsAll(c);
|
||||
return new HashSet<>(content).containsAll(c);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -208,8 +208,8 @@ public final class FileStreamingUtil {
|
||||
if (ifRangeTime != -1 && ifRangeTime + 1000 < lastModified) {
|
||||
ranges.add(full);
|
||||
}
|
||||
} catch (final IllegalArgumentException ignore) {
|
||||
log.info("Invalid if-range header field", ignore);
|
||||
} catch (final IllegalArgumentException ignored) {
|
||||
log.info("Invalid if-range header field", ignored);
|
||||
ranges.add(full);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user