Closed michael-schnell closed 1 year ago
Hey @michael-schnell,
This is not a bug. You are supposed to use smart-constructor like you did in your first snippet so we populate the proper grpc data structure when communicating with the server. expectedRevision
methods expects a positive integer value, anything different would either end with an exception or an unexpected behavior depending on the server version you are targeting.
If you want to get the proper ExpectedRevision
instance while still passing -1 or -2, I suggest you to use ExpectedRevision.fromRawlong
static method that deals with that for you.
Writing to the stream with "any" works fine with using "ExpectedRevision.any()":
Using the same value as "long" does not work:
It raises an exception:
Using "-1" (noStream) as long value works fine.