Selector doesn't implement Closeable

Alan Bateman Alan.Bateman at Sun.COM
Sun Nov 22 06:30:13 PST 2009

Rémi Forax wrote:
> Hi alan, Hi all,
> I've just found that Selector doesn't implement Closeable
> so I can't use my method closeWithoutIOException(Closeable) on it.
> I know that such change can theoretically break some existing programs 
> but
> I am not sure I will appear in real life.
> Should I submit a bug for this one ?
> Rémi
Rémi - you're right and we should have done this. It's come up a few 
times. I think David Lloyd brought it up here last year. Several other 
existing classes have been retrofitted to implement Closeable in jdk7 
(,, and others) and I can't think 
of any reasonable not to do the same for Selector.

I've created this bug to track it:
  6903753: (se) Selector should implement Closeable

and you are welcome to "own it" (the only thing is that it's an API 
change so it will need a bit of paperwork).


More information about the nio-dev mailing list