aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-api
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2019-04-29 15:29:57 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2019-04-29 15:29:57 +0200
commita2f7ac956ef2785bb4980872e9dbdc7ef61bdd10 (patch)
tree6c9e508dab67b5ea9cf2e3f4ae4bacf62c2c3375 /hosted-api
parentfd568af3e1f67ff581fc77d80d422ef152d8e3e6 (diff)
Make dependencies provided
Diffstat (limited to 'hosted-api')
-rw-r--r--hosted-api/pom.xml2
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java8
2 files changed, 6 insertions, 4 deletions
diff --git a/hosted-api/pom.xml b/hosted-api/pom.xml
index 3ca8c3c5fd5..597cd57f8dd 100644
--- a/hosted-api/pom.xml
+++ b/hosted-api/pom.xml
@@ -17,11 +17,13 @@
<groupId>com.yahoo.vespa</groupId>
<artifactId>config-provisioning</artifactId>
<version>${project.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>vespajlib</artifactId>
<version>${project.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java b/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java
index 6b2f5596fd6..0dde6fd3bde 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java
@@ -39,8 +39,8 @@ public class MultiPartStreamer {
}
/** Adds the given data as a named part in this, using the {@code "text/plain"} content type. */
- public MultiPartStreamer addText(String name, String json) {
- return addData(name, "text/plain", json);
+ public MultiPartStreamer addText(String name, String text) {
+ return addData(name, "text/plain", text);
}
/** Adds the given data as a named part in this, using the {@code "application/json"} content type. */
@@ -57,9 +57,9 @@ public class MultiPartStreamer {
}
/** Adds the given data as a named part in this, using the {@code "application/octet-stream" content type}. */
- public MultiPartStreamer addBytes(String name, byte[] data) {
+ public MultiPartStreamer addBytes(String name, byte[] bytes) {
streams.add(() -> separator(name, "application/octet-stream"));
- streams.add(() -> new ByteArrayInputStream(data));
+ streams.add(() -> new ByteArrayInputStream(bytes));
return this;
}