Skip to content

Commit

Permalink
Fix warnings in StatementClient
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed May 14, 2015
1 parent 832d685 commit 062d0ee
Showing 1 changed file with 5 additions and 7 deletions.
Expand Up @@ -191,14 +191,15 @@ public boolean isValid()

public boolean advance()
{
if (isClosed() || (current().getNextUri() == null)) {
URI nextUri = current().getNextUri();
if (isClosed() || (nextUri == null)) {
valid.set(false);
return false;
}

Request request = prepareGet()
.setHeader(USER_AGENT, USER_AGENT_VALUE)
.setUri(current().getNextUri())
.setUri(nextUri)
.build();

Exception cause = null;
Expand Down Expand Up @@ -255,12 +256,9 @@ private RuntimeException requestFailedException(String task, Request request, Js
{
gone.set(true);
if (!response.hasValue()) {
return new RuntimeException(format("Error " + task + " at %s returned an invalid response: %s", request.getUri(), response), response.getException());
return new RuntimeException(format("Error %s at %s returned an invalid response: %s", task, request.getUri(), response), response.getException());
}
return new RuntimeException(format("Error " + task + " at %s returned %s: %s",
request.getUri(),
response.getStatusCode(),
response.getStatusMessage()));
return new RuntimeException(format("Error %s at %s returned %s: %s", task, request.getUri(), response.getStatusCode(), response.getStatusMessage()));
}

public boolean cancelLeafStage()
Expand Down

0 comments on commit 062d0ee

Please sign in to comment.