summaryrefslogtreecommitdiffstats
path: root/vespa-http-client
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-10-14 19:20:56 +0200
committerGitHub <noreply@github.com>2018-10-14 19:20:56 +0200
commit7518ce3820175680c68b4d574a1520028d663092 (patch)
treee5ff47b26436a22ab02a548f79ff29b0d02c800f /vespa-http-client
parent46e014afbe93b74b977ea1c0055df3ae063cadb3 (diff)
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, 3 insertions, 4 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 06edd222be2..4f5b30444a9 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 enum DataFormat {
+ public static 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 eb3e8ec982b..9a8640d09e2 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,7 +35,6 @@ 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 e9852de215a..c2e94e14486 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<>();
- if (version == 2 || version == 3) { // TODO: Vespa 7: Remove support for version 2
+ List<ByteBuffer> data = new ArrayList<ByteBuffer>();
+ if (version == 2 || version == 3) {
for (Document doc : docs) {
int operationSize = doc.size() + startOfFeed.length + endOfFeed.length;
StringBuilder envelope = new StringBuilder();