Skip to main content

[jsr360-experts] Re: Fwd: Reminder: CLDC 8 / JSR 360 EG call - Conference Bridge

  • From: Werner Keil < >
  • To:
  • Subject: [jsr360-experts] Re: Fwd: Reminder: CLDC 8 / JSR 360 EG call - Conference Bridge
  • Date: Thu, 28 Feb 2013 21:42:31 +0100

Roger/all,

Given that all NIO Channel Exceptions spread across a multitude of superclasses, mainly IOException, IllegalStateException and in at least one case IllegalArgumentException, there is no consistent parent of existing exceptions, nor are either all checked (IOException) or unchecked (children of RuntimeException)
Thus if JDK 1.4 and above chose this mix on a case by case basis, it doesn't seem to be different or worse for those exceptions new as of CLDC 8.

JavaDoc similar to those exceptions already there.
"Unchecked exception thrown..."
may be a good idea, unless this is already highlighted.

Regards,
 -- 

Werner Keil JCP Executive Committee Member | Eclipse UOMo Lead, Babel Language Champion | Java Godfather

Twitter @wernerkeil | @JSR354 | #Java_Social | #EclipseUOMo | #OpenDDR

Skype werner.keil | Google+ gplus.to/wernerkeil

* Expert Days Berlin: April 5 2013, Berlin, Germany. Werner Keil, JCP Executive Committee Member, JSR 354 EG Member will co-present "JSR 354 - Money and Currency API for Java"

On Thu, Feb 28, 2013 at 9:12 PM, roger riggs < " target="_blank"> > wrote:
Hi Werner,

The choices for the exceptions in NIO were made in JSR 51 and JSR 203,
explanations are possible to promote understanding but the API is fixed.

ClosedFileSstemException extends IllegalStateException to reflect that
after the FileSystem is closed any operations on it or objects previously retrieved
from it are not valid.  It reflects a coding error by the developer.

ClosedChannelException and those that extend IOException are intended
to handle normal conditions that occur while processing a particular I/O stream
and reflect conditions that happen more dynamically in the channel.

Roger



On 2/27/2013 9:42 AM, Werner Keil wrote:
Dear Experts,

Following the discussion about NIO, please could we clarify why java.nio.file.ClosedFileSystemException
was intended to be IllegalArgumentException, hence a RuntimeException, while java.nio.channels.ClosedChannelException from NIO (as far back as JDK 1.4) extends IOException?

I understand, ClosedFileSystemException may not be a FileSystemException (which has e.g. getFile() and other methods that no longer make sense in this case) but to be consistent with e.g. ClosedChannelException, it should be an IOException, regardless if that is checked or unchecked (it is checked, but that's historically grown and can't be changed I guess

Thanks and Regards,
Werner

On Wed, Feb 27, 2013 at 12:56 PM, < " target="_blank"> > wrote:
Hi Werner,

many thanks for your comments. Let's talk about it on today's call.

Best regards,

Michael


 



[jsr360-experts] Re: Fwd: Reminder: CLDC 8 / JSR 360 EG call - Conference Bridge

michael.lagally 02/27/2013

[jsr360-experts] Re: Fwd: Reminder: CLDC 8 / JSR 360 EG call - Conference Bridge

Werner Keil 02/27/2013

[jsr360-experts] Re: Fwd: Reminder: CLDC 8 / JSR 360 EG call - Conference Bridge

roger riggs 02/28/2013

[jsr360-experts] Re: Fwd: Reminder: CLDC 8 / JSR 360 EG call - Conference Bridge

Werner Keil 02/28/2013
 
 
Close
loading
Please Confirm
Close