On Mon, 3 Apr 2023 07:19:10 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:
>> I found it strange that a method named `cast` would reject `null` as an >> argument, but will happily return `null` and require the caller to check it. > > The name might need updating, although when the name can't cover the exact > intended functionality, the docs are supposed to explain all the details. > > I may not need the cast at all anymore; I think the class is just asking for > casts to satisfy some generic code, but that shouldn't be relevant. All I > would really need is an instanceof check. I'll have another look. see comment about equals() above, should we store the element type and check against it when needed? ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1076#discussion_r1175784235