This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] PR libgcj/19444 - java.net.URI fixes


On Sat, 2005-01-15 at 17:22 +0100, Michael Koch wrote:
> +           if (portStr != null)
> +             try
> +               {
> +                 port = Integer.parseInt(portStr);
> +               }
> +             catch (NumberFormatException e)
> +               {
> +                 URISyntaxException use = new URISyntaxException(str, "doesn't match URI regular expression");
> +                 use.initCause(e);
> +                 throw e;
> +               }

Please wrap that long line.
And you want to throw the URISyntaxException use, not just the
NumberFormatException e.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]