New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 754886 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Pre-submit check contradicts git cl format for Java one-liner lambda

Project Member Reported by ctzsm@chromium.org, Aug 11 2017

Issue description

For example,
'''java
final FutureTask<Boolean> result = new FutureTask<Boolean>(() -> { return true; });
'''

Satisfy git cl format, but pre-submit check complains as follows:

 chrome/android/javatests/src/org/chromium/chrome/browser/printing/PrintingControllerTest.java:277:74: '{' at column 74 should have line break after.

I have to use // clang-format on/off to disable git cl format and use what pre-submit check to upload cl.

Example CL: https://chromium-review.googlesource.com/c/612045
 

Comment 1 by ctzsm@chromium.org, Aug 11 2017

I guess in this case, pre-submit check is correct, we need to fix git cl format  https://google.github.io/styleguide/javaguide.html#s4.1.2-blocks-k-r-style

Comment 2 by ctzsm@chromium.org, Aug 11 2017

Cc: zpeng@chromium.org
Components: Infra>Git

Comment 3 by ctzsm@chromium.org, Aug 11 2017

Oh, I just realized I can do
final FutureTask<Boolean> result = new FutureTask<Boolean>(() -> true);

Comment 4 by ctzsm@chromium.org, Aug 11 2017

Status: WontFix (was: Untriaged)

Sign in to add a comment