From d190aa6ca565631d014a03414d5afa2f1aa9f3cd 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 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 X-link: 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 --- .../business/cloudbridge/pl/server/DeploymentParams.java | 4 +++- .../business/cloudbridge/pl/server/PCEValidatorRunner.java | 3 ++- .../cloudbridge/pl/server/ToolkitInstallationParams.java | 4 +++- .../facebook/business/cloudbridge/pl/server/Validator.java | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/DeploymentParams.java b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/DeploymentParams.java index d0bfe4150..c62a3067f 100644 --- a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/DeploymentParams.java +++ b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/DeploymentParams.java @@ -112,7 +112,9 @@ public void validate() throws InvalidDeploymentArgumentException { logAndThrow( "Invalid Tag Postfix: " + tag - + "\nMake sure the tag length is less than 20 characters, and using lowercase letters, numbers and dash only."); + + "\n" + + "Make sure the tag length is less than 20 characters, and using lowercase letters," + + " numbers and dash only."); } if (!validConfigStorage()) { logAndThrow("Invalid Configuration Storage: " + configStorage); diff --git a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/PCEValidatorRunner.java b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/PCEValidatorRunner.java index 0d4d8d473..724219685 100644 --- a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/PCEValidatorRunner.java +++ b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/PCEValidatorRunner.java @@ -54,7 +54,8 @@ public PCEValidatorAPIReturn start(final @NonNull DeploymentParams deployment) { if (credentialValidationResult.isSuccessful == false) { return new PCEValidatorAPIReturn( PCEValidatorAPIReturn.Status.STATUS_FAIL, - "The AWS access key ID and secret access key provided are invalid. Please review the information provided and try again."); + "The AWS access key ID and secret access key provided are invalid. Please review the" + + " information provided and try again."); } final ShellCommandRunner.CommandRunnerResult pceValidationResult = diff --git a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/ToolkitInstallationParams.java b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/ToolkitInstallationParams.java index 52d5a8580..b50056b44 100644 --- a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/ToolkitInstallationParams.java +++ b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/ToolkitInstallationParams.java @@ -86,7 +86,9 @@ public void validate() throws InvalidDeploymentArgumentException { logAndThrow( "Invalid Tag Postfix: " + tag - + "\nMake sure the tag length is less than 20 characters, and using lowercase letters, numbers and dash only."); + + "\n" + + "Make sure the tag length is less than 20 characters, and using lowercase letters," + + " numbers and dash only."); } if (!validConfigStorage()) { logAndThrow("Invalid Configuration Storage: " + configStorage); diff --git a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/Validator.java b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/Validator.java index 84cebfa63..d36c641ce 100644 --- a/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/Validator.java +++ b/fbpcs/infra/cloud_bridge/server/src/main/java/com/facebook/business/cloudbridge/pl/server/Validator.java @@ -93,7 +93,8 @@ private ValidatorResult validateVpcQuotaPerRegion(DeploymentParams deploymentPar return new ValidatorResult( false, String.format( - "VPC limit is at peak in region %s. Contact your Meta representatives for more information if needed.", + "VPC limit is at peak in region %s. Contact your Meta representatives for more" + + " information if needed.", deploymentParams.region)); }