Skip to content

Commit 3d802ba

Browse files
authored
Relax data dictionary (#103)
1 parent e00702c commit 3d802ba

3 files changed

Lines changed: 0 additions & 5 deletions

File tree

src/main/java/io/getstream/core/models/CollectionData.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.getstream.core.models;
22

33
import static com.google.common.base.MoreObjects.firstNonNull;
4-
import static com.google.common.base.Preconditions.checkArgument;
54
import static com.google.common.base.Preconditions.checkNotNull;
65
import static io.getstream.core.utils.Serialization.convert;
76

@@ -55,7 +54,6 @@ public Map<String, Object> getData() {
5554

5655
@JsonAnySetter
5756
public <T> CollectionData set(String key, T value) {
58-
checkArgument(!"id".equals(key), "Key can't be named 'id'");
5957
checkNotNull(key, "Key can't be null");
6058

6159
data.put(key, value);

src/main/java/io/getstream/core/models/Data.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.getstream.core.models;
22

3-
import static com.google.common.base.Preconditions.checkArgument;
43
import static com.google.common.base.Preconditions.checkNotNull;
54
import static io.getstream.core.utils.Serialization.convert;
65

@@ -40,7 +39,6 @@ public Map<String, Object> getData() {
4039
}
4140

4241
public <T> Data set(String key, T value) {
43-
checkArgument(!"id".equals(key), "Key can't be named 'id'");
4442
checkNotNull(key, "Key can't be null");
4543

4644
data.put(key, value);

src/main/java/io/getstream/core/models/ProfileData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ public <T> T get(String key) {
5656

5757
@JsonAnySetter
5858
public <T> ProfileData set(String key, T value) {
59-
checkArgument(!"id".equals(key), "Key can't be named 'id'");
6059
checkNotNull(key, "Key can't be null");
6160

6261
data.put(key, value);

0 commit comments

Comments
 (0)