Skip to content

Commit

Permalink
Codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
persehoney committed Jun 26, 2024
1 parent 4cf9bf9 commit 99e1b7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.List;
import java.util.NoSuchElementException;

public class MergeRangeResult {
public final class MergeRangeResult {
private static final Comparator<MemorySegment> comparator = new MemorySegmentComparator();

private MergeRangeResult() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ private void sendLocalRange(CustomHttpSession session, String start, String end)
}

private void sendClusterRange(CustomHttpSession session, Request request, String start, String end) {
List<CompletableFuture<Response>> responses = getResponses(request, config.clusterUrls(), request.getURI().replace("&cluster=1", ""),
List<CompletableFuture<Response>> responses = getResponses(request, config.clusterUrls(),
request.getURI().replace("&cluster=1", ""),
responseInfo -> new CustomSubscriber());
Iterator<Entry<MemorySegment>> localIterator = invokeLocalRange(start, end);

Expand Down Expand Up @@ -312,8 +313,8 @@ private static Response getBestResponse(List<Response> responses) {
Response bestResp = responses.getFirst();
for (int i = 1; i < responses.size(); i++) {
String bestRespTime = bestResp.getHeader(HEADER_TIMESTAMP_HEADER);
if (responses.get(i).getHeader(HEADER_TIMESTAMP) != null && (bestRespTime == null ||
Long.parseLong(responses.get(i).getHeader(HEADER_TIMESTAMP_HEADER))
if (responses.get(i).getHeader(HEADER_TIMESTAMP) != null && (bestRespTime == null
|| Long.parseLong(responses.get(i).getHeader(HEADER_TIMESTAMP_HEADER))
> Long.parseLong(bestRespTime))) {
bestResp = responses.get(i);
}
Expand Down

0 comments on commit 99e1b7a

Please sign in to comment.