You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.ClassCastException: java.lang.Object[] cannot be cast to com.example.MyClass[]
Everything works when the array carries more than one element. I have also tested with empty arrays, and I got the same exception. I am somehow reminded of #27 where arrays featured a similarly bugged behaviour, except it involved casting an ArrayList.
The text was updated successfully, but these errors were encountered:
gpiancastelli
changed the title
Cannot read singleton arrays with JSON.arrayOfFrom
Cannot read empty or singleton arrays with JSON.arrayOfFrom
Mar 24, 2016
When I write:
my application crashes with a
ClassCastException
:Everything works when the array carries more than one element. I have also tested with empty arrays, and I got the same exception. I am somehow reminded of #27 where arrays featured a similarly bugged behaviour, except it involved casting an
ArrayList
.The text was updated successfully, but these errors were encountered: