Code review request

Joe Bowbeer joe.bowbeer at gmail.com
Mon Feb 25 12:46:15 PST 2013


On Feb 25, 2013 9:31 AM, "Paul Sandoz" <paul.sandoz at oracle.com> wrote:
>
> Hi Remi,
>
> Thanks for the feedback i have addressed some of this, mostly related to
inner classes, in following change set to the lambda repo:
>
> http://hg.openjdk.java.net/lambda/lambda/jdk/rev/3e50294c68ea
>
> We can update the webrev next week.
>
>
> On Feb 23, 2013, at 11:51 AM, Remi Forax <forax at univ-mlv.fr> wrote:
>
>> On 02/21/2013 08:17 PM, Brian Goetz wrote:
>>>
>>> At
>>>  http://cr.openjdk.java.net/~briangoetz/jdk-8008670/webrev/
>>>
>>> I've posted a webrev for about half the classes in java.util.stream.
None of these are public classes, so there are no public API issues here,
but plenty of internal API issues, naming issues (ooh, a bikeshed), and
code quality issues.
>>>
>>
>> Hi Brian,
>>
>> Also, when a if block ends with a return, there is no need to use 'else',
>>
>> if (result != null) {
>>   foundResult(result);
>>   return result;
>> }
>> else
>>   return null;
>>
>> can be simply written:
>>
>> if (result != null) {
>>   foundResult(result);
>>   return result;
>> }
>> return null;
>>
>
> Regarding code conventions i would prefer to auto-format all code to
ensure consistency, as to what that consistency is, well we could argue
until heat death of the universe :-) I am fine as long as it is consistent
and easy to hit Alt-Cmd-L or what ever it is in ones favourite IDE.
>

The omission of else after a return is a refinement that is not covered in
any style guide that I am aware of.

However, I think most everything else is covered by these:

http://www.oracle.com/technetwork/java/codeconv-138413.html

Alt-Shift-F ;-)

Joe


More information about the lambda-libs-spec-observers mailing list