>
> 1. Renamed the internal ArrayList to something like ArrayWrappingList
> 2. Overrode add
>
> then the stack trace could be enough (or better than the status quo)
>
> jshell> Arrays.asList(1, 2, 3).add(4);
> | Exception java.lang.UnsupportedOperationException
> |
our observation, I believe that:
>
>`new ArrayList<>(Arrays.asList(array))`
>
> will get you what you want.
>
> best regards,
>
> -- daniel
>
> On 18/11/2022 16:29, Andreas Røsdal wrote:
> > Yes, the exception comes when adding objects to the retur