-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When we try to save a long value into a map entry, it seems like it is saved as a float value. Following code prints "F64" as the type
import org.automerge.*;
import java.util.Optional;
public class IntFloatIssue {
public static void main(String args[]) {
Document doc = new Document();
ObjectId annoMapObj;
try (Transaction tx = doc.startTransaction()) {
annoMapObj = tx.set(ObjectId.ROOT, "annotations", ObjectType.MAP);
long value = 10000000000L;
tx.set(annoMapObj, "longval", value);
tx.commit();
}
Optional<AmValue> amValue = doc.get(annoMapObj, "longval");
System.out.println(amValue.get().getClass().getSimpleName());
}
}
Metadata
Metadata
Assignees
Labels
No labels