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
Foo
Bar
Exception in thread "main" java.lang.IndexOutOfBoundsException
at com.jsoniter.any.ArrayLazyAny.fillCacheUntil(ArrayLazyAny.java:163)
at com.jsoniter.any.ArrayLazyAny.access$000(ArrayLazyAny.java:13)
at com.jsoniter.any.ArrayLazyAny$LazyIterator.<init>(ArrayLazyAny.java:197)
at com.jsoniter.any.ArrayLazyAny.iterator(ArrayLazyAny.java:79)
at java.lang.Iterable.forEach(Iterable.java:74)
...
A simple workaround is to get the array as a list and use the forEach() method of the list:
If I use the
forEach()
method ofAny
on an empty array, a IndexOutOfBoundsException is thrown.Simple example to reproduce:
This results in:
A simple workaround is to get the array as a list and use the
forEach()
method of the list:The dependency I used in my
pom.xml
:Am I doing something wrong or is this a bug?
Thank you!
The text was updated successfully, but these errors were encountered: