[one-users] Java OCA: poor choiche of Exception class

Gian Uberto Lauri saint at eng.it
Mon Apr 4 03:59:21 PDT 2011


Hello, I just started to use  OCA and immediately had the bad surprise
to find an "Exception" thrown by Client class instantiation.

Peeking in the code, I discovered that the Client class throws it when
it does not  find two mandatory resources, the $ONE_AUTH  file and the
SHA-1 algorithm.

In my  (not so) humble  opinion, the use of  the raw Exception  is not
meaningful enought, the  use of a OneSetupException would  have add NO
testing or correctness  complication and could be more  useful for the
coder.

Furthermore, I think  these are Errors, not Exceptions  since you have
no way to recover from one with  a try/catch, you have to stop the VM,
correct the setup and restart.

Should I fill  an update request/provide a contribution  or there's no
chanche that this will enter in the code ?


--
ing. Gian Uberto Lauri
Ricercatore / Reasearcher
Laboratorio Ricerca e Sviluppo / Research & Development Lab.
Area Calcolo Distribuito / Distributed Computation Area

GianUberto.Lauri at eng.it

Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD) 

Tel. +39-049.8283.571         | main(){printf(&unix["\021%six\012\0"], 
Fax  +39-049.8283.569		  |    (unix)["have"]+"fun"-0x60);}   
Skype: gian.uberto.lauri	  |          David Korn, AT&T Bell Labs             
http://www.eng.it 			  |          ioccc best One Liner, 1987             



More information about the Users mailing list