add changes as suggested by cheddar

This commit is contained in:
Hagen Rother 2014-03-27 19:46:53 +01:00
parent 6fb3e61a98
commit d6f4cf3733
1 changed files with 4 additions and 4 deletions

View File

@ -292,20 +292,20 @@ public class DirectDruidClient<T> implements QueryRunner<T>
try { try {
jp = objectMapper.getFactory().createParser(future.get()); jp = objectMapper.getFactory().createParser(future.get());
if (jp.nextToken() != JsonToken.START_ARRAY) { if (jp.nextToken() != JsonToken.START_ARRAY) {
throw new IAE("Next token wasn't a START_ARRAY, was[%s] in url [%s]", jp.getCurrentToken(), url); throw new IAE("Next token wasn't a START_ARRAY, was[%s] from url [%s]", jp.getCurrentToken(), url);
} else { } else {
jp.nextToken(); jp.nextToken();
objectCodec = jp.getCodec(); objectCodec = jp.getCodec();
} }
} }
catch (IOException e) { catch (IOException e) {
throw Throwables.propagate(new RE(e, "Failure getting results from[%s]", url)); throw new RE(e, "Failure getting results from[%s]", url);
} }
catch (InterruptedException e) { catch (InterruptedException e) {
throw Throwables.propagate(new RE(e, "Failure getting results from[%s]", url)); throw new RE(e, "Failure getting results from[%s]", url);
} }
catch (ExecutionException e) { catch (ExecutionException e) {
throw Throwables.propagate(new RE(e, "Failure getting results from[%s]", url)); throw new RE(e, "Failure getting results from[%s]", url);
} }
} }
} }