fixes and debugging

This commit is contained in:
Colin Goodheart-Smithe 2015-09-23 19:57:59 +01:00
parent 85f4c39b69
commit 2de450ca0b
2 changed files with 7 additions and 2 deletions

View File

@ -123,7 +123,7 @@ public class GetIndexResponse extends ActionResponse {
in.readString(),
in.readStringArray(),
in.readOptionalBoolean(),
SearchSourceBuilder.PROTOTYPE.readFrom(in))
in.readBoolean() ? SearchSourceBuilder.PROTOTYPE.readFrom(in) : null)
);
}
warmersMapBuilder.put(key, Collections.unmodifiableList(warmerEntryBuilder));
@ -174,7 +174,11 @@ public class GetIndexResponse extends ActionResponse {
out.writeString(warmerEntry.name());
out.writeStringArray(warmerEntry.types());
out.writeOptionalBoolean(warmerEntry.requestCache());
warmerEntry.source().writeTo(out);
boolean hasSource = warmerEntry.source() != null;
out.writeBoolean(hasSource);
if (hasSource) {
warmerEntry.source().writeTo(out);
}
}
}
out.writeVInt(mappings.size());

View File

@ -100,6 +100,7 @@ public class DoSection implements ExecutableSection {
}
} catch(RestException e) {
if (!Strings.hasLength(catchParam)) {
System.out.println(apiCallSection.getBodies()); // NOCOMMIT remove this
fail(formatStatusCodeMessage(e.restResponse(), "2xx"));
} else if (catches.containsKey(catchParam)) {
assertStatusCode(e.restResponse());