summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-10-14 22:21:27 +0200
committerGitHub <noreply@github.com>2018-10-14 22:21:27 +0200
commit777a6a5fca253a104c97f47ccdad1f231f1e951b (patch)
tree2ddf8ceb4b46c15683ad5eedb3c78d35dfac188a /vespa-http-client
parent570222ec5aa05a3c56d8876cf910e9aa7da42acf (diff)
Revert "Revert "Simplify and correct isFilled""
Diffstat (limited to 'vespa-http-client')
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java2
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java1
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java4
3 files changed, 4 insertions, 3 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
index 4f5b30444a9..06edd222be2 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
@@ -30,7 +30,7 @@ public final class FeedParams {
* Enumeration of data formats that are acceptable by the OutputStream
* returned by {@link com.yahoo.vespa.http.client.Session#stream(CharSequence)}.
*/
- public static enum DataFormat {
+ public enum DataFormat {
/** UTF-8-encoded XML. Preamble is not necessary. */
XML_UTF8,
JSON_UTF8
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java
index 9a8640d09e2..eb3e8ec982b 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/SessionParams.java
@@ -35,6 +35,7 @@ public final class SessionParams {
* settings, use {@link #setConnectionParams(ConnectionParams)}.
*/
public static final class Builder {
+
private final List<Cluster> clusters = new LinkedList<>();
private FeedParams feedParams = new FeedParams.Builder().build();
private ConnectionParams connectionParams = new ConnectionParams.Builder().build();
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
index c2e94e14486..e9852de215a 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnection.java
@@ -160,8 +160,8 @@ class ApacheGatewayConnection implements GatewayConnection {
}
private ByteBuffer[] getDataWithStartAndEndOfFeed(List<Document> docs, int version) {
- List<ByteBuffer> data = new ArrayList<ByteBuffer>();
- if (version == 2 || version == 3) {
+ List<ByteBuffer> data = new ArrayList<>();
+ if (version == 2 || version == 3) { // TODO: Vespa 7: Remove support for version 2
for (Document doc : docs) {
int operationSize = doc.size() + startOfFeed.length + endOfFeed.length;
StringBuilder envelope = new StringBuilder();