Re: [rfc][icedtea-web] AboutDialog IOExceptions

Jacob Wisor gitne at excite.co.jp
Thu Jul 25 14:21:07 PDT 2013


"Andrew Azores"<aazores at xxxxxxxxxx> wrote:
> 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 .

Oh right, I'm sorry, I should have looked more carefully.
 
> Good point about catching Exception in general though, I'll change that
> to IOException.
> 
> Andrew A



More information about the distro-pkg-dev mailing list