pichlerd1 / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Unnecessary 'throws Exception' Declarations [R9 deferred] #109

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
*** This issue was imported from http://java.net/jira/browse/XHTMLRENDERER-88

It was reported by grlea on 07.06.2005 07:37:04 +0200 and last updated in the 
previous bug tracker on 27.01.2008 18:49:51 +0100

Found in
Operating System: All
Platform: All

The priority for this issue at migration was Major.

Original description: 
The following method declare that they throw Exception, but do not need to (as 
they don't!):

XHTMLPanel.XHTMLPanel
XHTMLPanel.setDocument(URL)
BasicPanel.loadDocument(URL)

Original issue reported on code.google.com by pdoubl...@gmail.com on 16 Feb 2011 at 10:03

GoogleCodeExporter commented 8 years ago
tobega wrote on 26.06.2005 02:07:44 +0200:
There are also a lot of catch(Exception ex). This is bad style, as it will catch
RuntimeExceptions too.

I know it was probably necessary when our code was less stable...

If there still are places where it is needed, please comment why.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 10:03

GoogleCodeExporter commented 8 years ago
joshy wrote on 17.07.2005 21:04:47 +0200:
I thought that runtime exceptions were supposed to be subclasses of Error?  
Still, we shouldn't ever be 
catching all exceptions, only the ones we are actually expecting. It can hide 
other code flaws like null 
pointer exceptions. We need to revise these interfaces in the future. In the 
interest of shipping R5 I'm 
moving this off to R6.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 10:03

GoogleCodeExporter commented 8 years ago
pdoubleya wrote on 25.07.2006 15:18:50 +0200:
This is sloppy coding--but unfortunately, needs to be addressed in a code
review. I will do a quick inspection via IntelliJ now, and defer the completion
until R7.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 10:03

GoogleCodeExporter commented 8 years ago
pdoubleya wrote on 27.01.2008 18:49:51 +0100:
This is an old bug, need a code sweep to see if it's still an issue. Deferring
to R9.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 10:03