It is unfortunate that there's `assertEquals(long, long)` overload that is 
applicable here.

Correct way of doing `Byte.valueOf()` is `Byte.valueOf((byte) 1)`, which is 
ugly. Probably even uglier way is `(Byte)(byte)1`. Another ugly approach is to 
create a local wrapper method `void myAssertEquals(Object a, Object b) { 
assertEquals(a, b); }`.

I mentioned `assertTrue()` as an example, not suggesting to use it.

To Rui's point, though, if you look at how `Byte.equals()` works, it accepts an 
`Object` and casts it to `Byte`, so in this case it shouldn't matter where to 
cast it at all, to cast it to `Byte` or `Object`. Casting here only allows to 
unambiguously choose the `assertEquals(Object, Object)` overload over 
`assertEquals(long, long)`, and I don't have an idea how to do that cleanly, so 
I don't mind either your approach or any of the proposed in the discussion.

[ Full content available at: https://github.com/apache/beam/pull/6383 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to