Re: Disambiguating empty catch blocks

2010-04-13 Thread Martin Buchholz
Hi Bruce, I don't think you're going to find enough support for adding rarely used new methods to existing exception classes. There's already a clear way to indicate to human readers that an exception should be ignored or is expected catch (SomeException ignored) { } catch (SomeException expect

Re: A List implementation backed by multiple small arrays rather than the traditional single large array.

2010-04-13 Thread Joe Kearney
Hi Kevin, Martin, To add another discussion point, I've been writing a draft/proof-of-concept of retrofitting the List interface onto ArrayDeque. This works over the raw array, it doesn't use the fancier structures being discussed elsewhere on this list that deal with splitting huge arrays into ar

Re: A List implementation backed by multiple small arrays rather than the traditional single large array.

2010-04-13 Thread Kevin L. Stern
Hi Martin, I had intended to address your request for absolute O(1) operations in the previous email. The approach to achieving this suggested in [Brodnik99resizablearrays] is tantamount to making ArrayList operations absolute O(1) by keeping around an array of size (3/2)*n and filling it with a

Re: A List implementation backed by multiple small arrays rather than the traditional single large array.

2010-04-13 Thread Kevin L. Stern
Hi Martin, It's interesting to note that the old circular list trick will not suffice to turn this data structure into a deque since we might be copying all n elements back to the front = 0 position every n^(1/2) operations (add wouldn't amortize to O(1)). We could use the old two stacks trick (p

hg: jdk7/tl/jdk: 6706251: api/java_net/NetworkInterface/index.html#misc: getDisplayName() returned non null but empty String

2010-04-13 Thread chris . hegarty
Changeset: 1672f0212f02 Author:chegar Date: 2010-04-13 12:02 +0100 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1672f0212f02 6706251: api/java_net/NetworkInterface/index.html#misc: getDisplayName() returned non null but empty String Reviewed-by: alanb, michaelm, andrew ! src/sh

Disambiguating empty catch blocks

2010-04-13 Thread Bruce Chapman
Empty catch blocks are ambiguous and can mean one of - I want to ignore this exception - the code works correctly when the catch block executes. - I know that this exception will never actually occur in this particular case - the catch block never executes. - The catch block is incomplete - a