harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: svn commit: r405120 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnection.java
Date Tue, 09 May 2006 15:18:48 GMT
+1 to the braces

2006/5/9, Geir Magnusson Jr <geir@pobox.com>:
>
>
> 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 <geir@pobox.com> 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
> >>
> >>
> >> tellison@apache.org 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: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message