Skip to content

Commit aadb56f

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 6939 b: refs/heads/tswast-patch-1 c: 662f57f h: refs/heads/master i: 6937: 89a6980 6935: 2753eb8
1 parent 2ea5182 commit aadb56f

3 files changed

Lines changed: 5 additions & 14 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 274b9ae5dfe0b8fc749dc5e55c38f574f09f8f0b
60+
refs/heads/tswast-patch-1: 662f57f18845f8d6e5aadd52dddf2b118422c6e5
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/BaseEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public B set(String name, List<? extends Value<?>> values) {
370370
* @param others other values in the list
371371
*/
372372
public B set(String name, Value<?> first, Value<?> second, Value<?>... others) {
373-
properties.put(name, of(first, second, others));
373+
properties.put(name, ListValue.builder().addValue(first).addValue(second, others).build());
374374
return self();
375375
}
376376

branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/ListValue.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,16 @@ private Builder() {
7070
super(ValueType.LIST);
7171
}
7272

73-
public Builder addValue(Value<?> value) {
73+
private void addValueHelper(Value<?> value) {
7474
// see datastore_v1.proto definition for list_value
7575
Preconditions.checkArgument(value.type() != ValueType.LIST, "Cannot contain another list");
7676
listBuilder.add(value);
77-
return this;
7877
}
7978

8079
public Builder addValue(Value<?> first, Value<?>... other) {
81-
addValue(first);
80+
addValueHelper(first);
8281
for (Value<?> value : other) {
83-
addValue(value);
82+
addValueHelper(value);
8483
}
8584
return this;
8685
}
@@ -125,10 +124,6 @@ public ListValue(Value<?> first, Value<?>... other) {
125124
this(new Builder().addValue(first, other));
126125
}
127126

128-
ListValue(Value<?> first, Value<?> second, Value<?>... other) {
129-
this(new Builder().addValue(first).addValue(second, other));
130-
}
131-
132127
private ListValue(Builder builder) {
133128
super(builder);
134129
}
@@ -146,10 +141,6 @@ public static ListValue of(Value<?> first, Value<?>... other) {
146141
return new ListValue(first, other);
147142
}
148143

149-
static ListValue of(Value<?> first, Value<?> second, Value<?>... other) {
150-
return new ListValue(first, second, other);
151-
}
152-
153144
public static Builder builder() {
154145
return new Builder();
155146
}

0 commit comments

Comments
 (0)