Skip to content

Commit 22f33d7

Browse files
committed
Use helper method to make code more DRY
1 parent 73d2fa3 commit 22f33d7

File tree

1 file changed

+1
-2
lines changed
  • firebase-firestore/src/main/java/com/google/firebase/firestore/model

1 file changed

+1
-2
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/model/ObjectValue.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ public final class ObjectValue implements Cloneable {
4242
private final Map<String, Object> overlayMap = new HashMap<>();
4343

4444
public static ObjectValue fromMap(Map<String, Value> value) {
45-
return new ObjectValue(
46-
Value.newBuilder().setMapValue(MapValue.newBuilder().putAllFields(value)).build());
45+
return new ObjectValue(Values.encodeValue(value));
4746
}
4847

4948
public ObjectValue(Value value) {

0 commit comments

Comments
 (0)