Skip to content

Commit ba4b324

Browse files
committed
http187 correct some variable names
Signed-off-by: davidradl <david_radley@uk.ibm.com>
1 parent 651af4d commit ba4b324

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/com/getindata/connectors/http/internal/sink/httpclient/BatchRequestSubmitter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ int getBatchSize() {
8484

8585
private CompletableFuture<JavaNetHttpResponseWrapper> sendBatch(
8686
String endpointUrl,
87-
List<HttpSinkRequestEntry> reqeustBatch) {
87+
List<HttpSinkRequestEntry> requestBatch) {
8888

89-
HttpRequest httpRequest = buildHttpRequest(reqeustBatch, URI.create(endpointUrl));
89+
HttpRequest httpRequest = buildHttpRequest(requestBatch, URI.create(endpointUrl));
9090
return httpClient
9191
.sendAsync(
9292
httpRequest.getHttpRequest(),
@@ -102,19 +102,19 @@ private CompletableFuture<JavaNetHttpResponseWrapper> sendBatch(
102102
);
103103
}
104104

105-
private HttpRequest buildHttpRequest(List<HttpSinkRequestEntry> reqeustBatch, URI endpointUri) {
105+
private HttpRequest buildHttpRequest(List<HttpSinkRequestEntry> requestBatch, URI endpointUri) {
106106

107107
try {
108-
var method = reqeustBatch.get(0).method;
109-
List<byte[]> elements = new ArrayList<>(reqeustBatch.size());
108+
var method = requestBatch.get(0).method;
109+
List<byte[]> elements = new ArrayList<>(requestBatch.size());
110110

111111
BodyPublisher publisher;
112112
// By default, Java's BodyPublishers.ofByteArrays(elements) will just put Jsons
113113
// into the HTTP body without any context.
114114
// What we do here is we pack every Json/byteArray into Json Array hence '[' and ']'
115115
// at the end, and we separate every element with comma.
116116
elements.add(BATCH_START_BYTES);
117-
for (HttpSinkRequestEntry entry : reqeustBatch) {
117+
for (HttpSinkRequestEntry entry : requestBatch) {
118118
elements.add(entry.element);
119119
elements.add(BATCH_ELEMENT_DELIM_BYTES);
120120
}

0 commit comments

Comments
 (0)