dev@glassfish.java.net

Re: Implementation Improvements in Entity-Persistence

From: Markus KARG <markus.karg_at_gmx.net>
Date: Tue, 03 Oct 2006 16:43:11 +0200

Jakub,

actually if you want to contribute to GF, you need to be a Java
professional (sorry for all others, but I doubt anyone else is able to
even understand what GF does). Saying that, I believe any Java
professional is able to add the missing bracket. Also, since no one will
write code without adding a JUnit test first (we all are professionals,
remember ;-) ) one minute later JUnit will tell you that you missed the
bracket, actually.

Have Fun
Markus

Jakub Podlesak wrote:
> Hi Markus,
>
> just a comment on (5). Please see document at
> http://java.sun.com/docs/codeconv/CodeConventions.pdf
>
> By omitting brackets in such a code you just make the code
> shorter, but certainly not better for reading, in spite what you wrote.
> And you also introduce a place for potential bug.
> Consider somebody wants to add a new line to such single line statement.
> If there are no brackets, he/she needs to add them as well, what
> could be a problem.... and it could be very easy to oversee
> missing brackets e.g where comments are heavily used.
>
> Have a nice day and good luck
>
> ~Jakub
>
>
>
> On Tue, Oct 03, 2006 at 12:37:51PM +0200, Markus KARG wrote:
>
>> (5) Do you think, Single Line Blocks are too short?
>>
>> Don't you like the shortness of single line blocks? Or are we all Java
>> beginners? ;-) Otherwise I cannot understand why you keep writing the
>> ending bracket in single-line blocks (e. g. FORs and IFs). This makes
>> the code harder to read and longer than needed. Java allows omitting
>> trailing brackets in single line blocks by intention, not by fault. ;-)
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>
>