+1 to the braces
2006/5/9, Geir Magnusson Jr <[EMAIL PROTECTED]>:
Ivan Volosyuk wrote:
> Geir,
> Where did you found it? As far as I see the lines:
> if (foo) bar;
> was changed to
> if (foo)
> bar;
Agreed. I'd fire anyone that worked for me and did
if (foo) bar;
more than once ;)
But I thought that the braces were removed from things :
if (foo) {
bar;
}
became
if (foo)
bar;
Now, I realize that some might call this religious or a bike-shed issue,
but I have seen how the latter leads to bugs when people make mistakes,
that they don't with the former.
Specifically, I've seen people accidentally add another statement to the
block that isn't there :
if (foo)
bar;
woogie;
(this isn't python :) I know that the braces take an extra line, but
it's so much safer, IMO.
if (foo) {
bar;
woogie;
}
Of course, I could be completely mistaken about the reformatting, and if
so.... never mind.
geir
>
> Looks like the main idea of change is that indenting of lines in class
> was corrected, possibly using some kind of tool.
> --
> Ivan
>
> On 5/9/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:
>> Why did you get rid of all of the braces, like in
>>
>> if (foo) {
>> ...
>> }
>>
>> ?
>>
>> I don't want to start code format wars, but I can't understand why you'd
>> want to undo what is considered in many places harmless good practice.
>>
>> geir
>>
>>
>> [EMAIL PROTECTED] wrote:
>> > Author: tellison
>> > Date: Mon May 8 11:20:42 2006
>> > New Revision: 405120
>> >
>> > URL: http://svn.apache.org/viewcvs?rev=405120&view=rev
>> > Log:
>> > Reformatting
>> >
>> > Modified:
>> >
>>
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
>>
>> >
>> > Modified:
>>
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
>>
>> > URL:
>>
http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java?rev=405120&r1=405119&r2=405120&view=diff
>>
>> >
>>
==============================================================================
>>
>> > ---
>>
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
>> (original)
>> > +++
>>
incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
>> Mon May 8 11:20:42 2006
>> > @@ -15,8 +15,9 @@
>> >
>> > package org.apache.harmony.luni.internal.net.www.protocol.http;
>> >
> [skipped]
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]