Ulf, I have my opinions too on code style. However, the published guidelines for Java code is what Oracle/Sun set out for themselves. AFAIK, it is what's expected for JDK source.
On Fri, Apr 26, 2013 at 7:29 AM, Ulf Zibis <ulf.zi...@cosoco.de> wrote: > I think, sometimes it is better to violate those 2 rules because: > - modern wide-screens have much horizontal, but less vertical space, > especially on labtops > - line break for only one/few word(s) looks ugly, disturbs read-flow > - it's no problem, if e.g. 1 of 50 lines must be scrolled a little > horizontally, but it's a big problem if I have to vertically scroll twice > often, when too much lines are "wasted". Comparing and understanding code > then becomes a nightmare. > > Referring to your example, on the other hand, continuation lines should be > indented 8 rather than 4 spaces to separate them from logical nesting. > Especially your last line looks like less nested than the three before, > which IMHO is a clear mistake. > > -Ulf > > > Am 25.04.2013 22:57, schrieb Paul Benedict: > > Henry, >> >> I believe the coding standards require curly braces for any if-statement >> and for-loop. >> >> Also the return statements exceed the 80 character limit. It would be nice >> to have them formatted across several lines like the following because >> it's >> difficult to read going straight across: >> >> return StreamSupport.intStream(() -> >> Spliterators.spliterator( >> new CharIterator(), >> length(), >> Spliterator.ORDERED), >> Spliterator.SUBSIZED | Spliterator.SIZED | Spliterator.ORDERED); >> >> Paul >> >> >