Automatic Resource Management, V.2

Ruslan Shevchenko Ruslan at Shevchenko.Kiev.UA
Mon Apr 20 11:23:55 PDT 2009

> 2009/4/20 Joshua Bloch <jjb at>:
>>> Why not return a List<Throwable> instead of an array (since
>>> Collections are generally nicer to use)?
>> I did think about this, but I opted to stick with the pattern in enum
>> types'
>> values() method. ═That decision was made for performance. Arguably the
>> performance issues are less important here, and the winds of change have
>> blown further away from arrays since then, so I'm definitely open to
>> switching this to a List if others think it's the right thing to do.

 Hmm, all low-level Java API is build on arrays.

Exists (IMHO) two valuable options: or rewrite all (getStackTrace(),
reflection) use collections, or leave all (and getSupressedException()) in
arrays. Introiduce one method which return list, when all others still
arrays is wrong.

So, better now leave all in arrays, then may-be do special step to change
all arrays to collection interfaces in java low-level api, if this needed.

More information about the coin-dev mailing list