Re: Task for an aspiring JDK contributor

2022-11-18 Thread Andreas Røsdal
> > 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 > |

Re: Task for an aspiring JDK contributor

2022-11-18 Thread Andreas Røsdal
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