From e8b5e491d56ced3846856bece7d28d9a4590f476 Mon Sep 17 00:00:00 2001 From: Jeff Bahr Date: Sat, 23 Mar 2024 16:07:04 -0700 Subject: [PATCH] Migrate google java format from 1.7 -> 1.21.0 (#35) Summary: X-link: https://github.com/facebookexternal/OculusManufacturing/pull/524 X-link: https://github.com/facebookexternal/fbpay/pull/3 X-link: https://github.com/facebook/screenshot-tests-for-android/pull/324 X-link: https://github.com/pytorch/executorch/pull/1771 X-link: https://github.com/facebook/igl/pull/68 X-link: https://github.com/facebook/mariana-trench/pull/153 X-link: https://github.com/facebook/fresco/pull/2757 X-link: https://github.com/facebook/litho/pull/974 X-link: https://github.com/facebook/react-native/pull/42754 X-link: https://github.com/facebook/hhvm/pull/9431 X-link: https://github.com/WhatsApp/eqwalizer/pull/52 X-link: https://github.com/facebookincubator/spectrum/pull/1858 X-link: https://github.com/fbsamples/metapay/pull/1 X-link: https://github.com/facebookincubator/fbjni/pull/95 X-link: https://github.com/facebookincubator/Battery-Metrics/pull/30 X-link: https://github.com/facebook/ktfmt/pull/440 X-link: https://github.com/facebook/flipper/pull/5456 X-link: https://github.com/facebook/hermes/pull/1290 Pull Request resolved: https://github.com/facebook/TextLayoutBuilder/pull/35 X-link: https://github.com/facebook/SoLoader/pull/122 allow-large-files 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 fbshipit-source-id: b675ae215084f340b93dfe628e329e696ca0616e --- .../fbui/textlayoutbuilder/TextLayoutBuilder.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/library/src/main/java/com/facebook/fbui/textlayoutbuilder/TextLayoutBuilder.java b/library/src/main/java/com/facebook/fbui/textlayoutbuilder/TextLayoutBuilder.java index 21ccd7d..d67c4ae 100644 --- a/library/src/main/java/com/facebook/fbui/textlayoutbuilder/TextLayoutBuilder.java +++ b/library/src/main/java/com/facebook/fbui/textlayoutbuilder/TextLayoutBuilder.java @@ -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); } } @@ -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; } @@ -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;