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

Issue 884367 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 768586



Sign in to add a comment

Java 8 Method References are not formatted correctly

Project Member Reported by dewittj@chromium.org, Sep 14

Issue description

clang-format produced code that (choose all that apply): 
+ Doesn't match Chromium style
+ Riles my finely honed stylistic dander
+ No sane human would ever choose

Seems like Java 8 Method References are given extra spaces for no reason. 

Here's the code before formatting:

   private void foo() {
        someFunctionAcceptingALambda(this::methodReference);
   }


Here's the code after formatting:

   private void foo() {
        someFunctionAcceptingALambda(this ::methodReference);
   }

Here's how it ought to look:

- no change -

Code review link for full files/context:

https://chromium-review.googlesource.com/c/chromium/src/+/1227216/2/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExperimentalExploreSitesSection.java
 
Labels: clang-format
Summary: Java 8 Method References are not formatted correctly (was: clang-format quality problem)
Blockedon: 768586
Landed in r343872. "Only" needs a clang-format roll now.
Status: Fixed (was: Assigned)
A clang-format with the fix got deployed on Nov 21 2018.

Sign in to add a comment