FWIW, I also think that having a call to new throw anything that isn't an OOME is opening up a much larger compatibility can of worms than anything else I intended with this patch.
Jeremy On Mon, Jun 15, 2009 at 12:39 AM, Jeremy Manson<[email protected]> wrote: > Hi Tomas (and David, presumably), > > Why is this a programming error? I thought it was just a VM > limitation. Surely the JVMS allows arrays of any nonnegative integral > size, no? > > Jeremy > > On Mon, Jun 15, 2009 at 12:20 AM, Tomas Hurka<[email protected]> wrote: >> Hi Martin and David, >> >> On 14 Jun 2009, at 21:37, Martin Buchholz wrote: >> >>> I've polished the changes in preparation for committing. >>> I'll commit once I have reviewer approval. >> >> I have the same concern as David. I think that throwing OOME, in places >> where there is obviously a simple programming error, is not a good idea. >> Will it be possible to change it to throw IllegalArgumentException instead? >> I have one more comment about the patch itself - changes to >> src/share/vm/gc_interface/collectedHeap.inline.hpp and >> src/share/vm/utilities/exceptions.hpp are unrelated to the bugfix. I think >> it will be better to separate them to the different changeset. >> >> Bye, >> -- >> Tomas Hurka <mailto:[email protected]> >> NetBeans Profiler http://profiler.netbeans.org >> VisualVM http://visualvm.dev.java.net >> Software Engineer, Developer Platforms Group >> Sun Microsystems, Praha Czech Republic >> >> >
