Skip to content

Commit

Permalink
Migrate google java format from 1.7 -> 1.21.0 (facebook#35)
Browse files Browse the repository at this point in the history
Summary:
X-link: facebook/screenshot-tests-for-android#324

X-link: pytorch/executorch#1771

X-link: facebook/igl#68

X-link: facebook/mariana-trench#153

X-link: facebook/fresco#2757

X-link: facebook/litho#974

X-link: facebook/react-native#42754

X-link: facebook/hhvm#9431

X-link: WhatsApp/eqwalizer#52

X-link: facebookincubator/spectrum#1858

X-link: fbsamples/metapay#1

X-link: facebookincubator/fbjni#95

X-link: facebookincubator/Battery-Metrics#30

X-link: facebook/ktfmt#440

X-link: facebook/flipper#5456

X-link: facebook/hermes#1290

Pull Request resolved: facebook#35

X-link: facebook/SoLoader#122

This diff migrates google java format form 1.7 to 1.21.0. This update will allow for new language features from java 17 and 21. This diff also formats all necessary files.

 Changelog:
    [Internal][Changed] - Updated format from google-java-format 1.7 -> 1.21.0

Reviewed By: IanChilds

Differential Revision: D52786052
  • Loading branch information
j-bahr authored and facebook-github-bot committed Mar 22, 2024
1 parent 40c604e commit 7656a54
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ public TextLayoutBuilder setText(@Nullable CharSequence text) {
text.hashCode();
} catch (NullPointerException e) {
throw new IllegalArgumentException(
"The given text contains a null span. Due to an Android framework bug, this will cause an exception later down the line.",
"The given text contains a null span. Due to an Android framework bug, this will cause"
+ " an exception later down the line.",
e);
}
}
Expand Down Expand Up @@ -962,7 +963,9 @@ public TextLayoutBuilder setMaxWidth(@Px int maxWidth) {
return this;
}

/** @return The density of this layout. If unset, defaults to 1.0 */
/**
* @return The density of this layout. If unset, defaults to 1.0
*/
public float getDensity() {
return mParams.paint.density;
}
Expand All @@ -982,7 +985,9 @@ public TextLayoutBuilder setDensity(float density) {
return this;
}

/** @return The justification mode of this layout. */
/**
* @return The justification mode of this layout.
*/
@RequiresApi(api = Build.VERSION_CODES.O)
public int getJustificationMode() {
return mParams.justificationMode;
Expand Down

0 comments on commit 7656a54

Please sign in to comment.