Skip to content

Commit faf3c4d

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 3595 b: refs/heads/pubsub-alpha c: 662f57f h: refs/heads/master i: 3593: f412083 3591: 93f602c
1 parent b8e6ab3 commit faf3c4d

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 36a62ef856d199f8efd09501b5ba65c422c01f23
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 7406918e071dd2c5677a638ae2a06e7592b6542c
5-
refs/heads/pubsub-alpha: 274b9ae5dfe0b8fc749dc5e55c38f574f09f8f0b
5+
refs/heads/pubsub-alpha: 662f57f18845f8d6e5aadd52dddf2b118422c6e5
66
refs/heads/update-datastore: 47aae517c2cb33f1dccd909adaced73ec9d0f4df
77
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
88
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd

branches/pubsub-alpha/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/pubsub-alpha/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)