On Jan 10, 2018, at 2:32 PM, Hannes Wallnöfer
wrote:
>
> Priya,
>
> The problem with your solution that using an object array invocation with a
> primitive array will throw a ClassCastException as it passes the isArray
> guard.
>
> On the other hand, the
Priya,
The problem with your solution that using an object array invocation with a
primitive array will throw a ClassCastException as it passes the isArray guard.
On the other hand, the problem with instanceof validation in Attila’s snippet
is that it uses the concrete callsite type (e.g.