Fork me on GitHub
#transit
<
2023-03-18
>
wevrem02:03:05

I’m still researching, but wondering why it emits both the tagged string version and the integer itself. That doesn’t have the potential to emit the same value twice?

Alex Miller (Clojure team)22:03:59

did you learn anything else? if so, happy to have an issue for this in transit-java

wevrem23:03:21

I was trying to think of a test I could run against the code. I’m not a Java expert, but it seems that you could never have a long variable with a value outside of the min/max range (which seems to make the if condition always false) If that is somehow possible, and that if condition becomes true, then, I believe that code would erroneously emit two values.

Alex Miller (Clojure team)20:04:31

I was just looking at this as I try to update to recent msgpack and this doesn't fail because the condition is never true - it's impossible for the if to ever pass, so only the last line is executed

wevrem20:04:09

It’s good that the code works, but IMO it is a little confusing reading it. You don’t normally expect to encounter an if condition coded up that can never be true.