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
Thanks for the report @mbruggmann ! Bail and return the original LST element is likely the quickest safe fix when there's a potentially empty array as argument. Is this something you'd be open to take on?
What version of OpenRewrite are you using?
rewrite-migrate-java 2.20.0
What is the smallest, simplest way to reproduce the problem?
I can reproduce the issue with the following testcase:
What did you expect to see?
Either to bail out and keep it as is.
Or alternatively we could translate the varargs parameter into a collection first, e.g.
Note that the more convenient-looking
EnumSet.copyOf(asList(units))
throws an exception for empty array.What did you see instead?
(doesn't compile)
The text was updated successfully, but these errors were encountered: