[rfc][icedtea-web] AboutDialog IOExceptions
Jiri Vanek
jvanek at redhat.com
Thu Jul 25 12:31:48 PDT 2013
On 07/25/2013 09:01 PM, Jacob Wisor wrote:
> "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.
>
there is an try :)
If it compiles, then ok to push. Thanx for clean up and check!
> Apart from that; nice clean up. :)
>
> Jacob
More information about the distro-pkg-dev
mailing list