RFC: java.net.*Exception.java

Bryce McKinlay bryce@waitaki.otago.ac.nz
Mon Aug 19 18:17:00 GMT 2002


Hi Michael,

This patch is fine and I will check it in. Just a few minor style fixes:

Michael Koch wrote:

>  public URISyntaxException(String input, String reason, int index)
>    throws NullPointerException, IllegalArgumentException
>

Here we don't generally declare "throws NullPointerException, 
IllegalArgumentException" because its redundant - they arn't checked 
exceptions.

>  {
>    if (input == null || reason == null) throw new NullPointerException();
>
>    
>    if (index < -1) throw new IllegalArgumentException();
>

The code following "if", "for", etc statements should go on the next 
line and be indented, ie:

if (index < -1)
  throw new IllegalArgumentException();

>  public String getMessage()
>  {
>    return input+":"+reason;
>  }
>  
>
There should be spaces between the +'s here.

Feel free to fill out the form at 
http://sources.redhat.com/cgi-bin/pdw/ps_form.cgi and we can get you set 
up with a CVS account so you can commit your own patches after approval.

regards

Bryce.




More information about the Java-patches mailing list