Re: [rfc][icedtea-web] AboutDialog IOExceptions
Jacob Wisor
gitne at excite.co.jp
Thu Jul 25 12:01:25 PDT 2013
"Andrew Azores"<aazores at redhat.com> wrote:
> Jiri added a try/catch in the HTMLPanel's constructor so it no longer
> throws IOExceptions if given a bad resource URL, but the constructor was
> still marked as throwing IOExceptions. Just removing that since it's no
> longer true, and removing the try/catches everywhere else in the code
> that handled that (generally, calls to AboutDialog.display()).
>
> Andrew A
> - public HTMLPanel(URL url, String identifier) throws
> IOException {
> + public HTMLPanel(URL url, String identifier) {
> super(new BorderLayout());
> id = identifier;
> JEditorPane pane = new JEditorPane();
> - try{
> + try {
> pane = new JEditorPane(url);
> } catch(Exception ex){
> //no need to have invalid url fatal
catch without a try? Does this compile? Besides, catching any exception is a bad idea or habit because RuntimeException and SecurityException fall into that category too. This may be inherently unsafe.
Apart from that; nice clean up. :)
Jacob
More information about the distro-pkg-dev
mailing list