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: RFC: java.net.*Exception.java


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.



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