This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PlainSocketImpl changes to support socket timeouts (again)
- To: "Nic Ferrier" <nferrier at tapsellferrier dot co dot uk>
- Subject: Re: PlainSocketImpl changes to support socket timeouts (again)
- From: Tom Tromey <tromey at redhat dot com>
- Date: 31 Jul 2001 15:50:13 -0600
- Cc: apbianco at cygnus dot com, java-patches at gcc dot gnu dot org
- References: <sb66fed4.070@tapsellferrier.co.uk>
- Reply-To: tromey at redhat dot com
>>>>> "Nic" == Nic Ferrier <nferrier@tapsellferrier.co.uk> writes:
Nic> Is there a working indent for java code?
Nic> The Classpath people suggest use of indent with a patch one but
Nic> no one has been able to tell me which version of indent the patch
Nic> applies to.
I think Bryce wrote some patches for GNU indent. However, I'm not
sure of the status of that. I've never used it.
Nic> Are your style guides more than the GNU coding standard?
The GNU standards don't address Java :-(. However, we took the GNU
standards for C and modified them for Java. In general the mapping is
obvious. One difference is that method braces are put just under the
method, and the return type for a method is on the same line. E.g.:
public static void main (String[] args)
{
...
}
There is some older code that doesn't conform to this. Pretend it
isn't there -- I do :-)
Nic> Yeah. I don't have time to do any more tests so I wanted to leave a
Nic> comment in the code, more for myself really.
Nic> I can commit a working copy sans comment.
I think the comment is fine.
Tom> A non-static inner class will have an implicit reference to its
Tom> creating object. So there is no need to have `socket' as a field
Tom> or as an argument to the constructor.
Nic> Yes. I like to do this for readability. I presume that the
Nic> compiler will remove (or homogenise) the dud reference.
Nic> But I'll change it if you want.
Please do. I'm sure the compiler won't remove it. I doubt any
compiler would.
Nic> However, without a conforming indent it's a real pain to
Nic> reproduce.
Yeah. I don't notice it so much since I've used the GNU style for
years and it is habitual.
Nic> I probably won't get round to this particular job till the
Nic> weekend.
Ok.
Tom