[rfc][icedtea-web] AboutDialog IOExceptions

Andrew Azores aazores at redhat.com
Thu Jul 25 12:19:46 PDT 2013


On 07/25/2013 03:01 PM, Jacob Wisor wrote:

>> -    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

The "try" is still there, I just added a space between the keyword and
the opening brace .

Good point about catching Exception in general though, I'll change that
to IOException.

Andrew A

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130725/6ddbd914/attachment.html 


More information about the distro-pkg-dev mailing list