Skip to content

Commit e5f7f03

Browse files
committed
Make checkstyle happier
1 parent 887a527 commit e5f7f03

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

installer/src/main/java/com/amazon/aws/partners/saasfactory/saasboost/SaaSBoostInstall.java

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.amazon.aws.partners.saasfactory.saasboost;
1718

1819
import com.amazon.aws.partners.saasfactory.saasboost.clients.AwsClientBuilderFactory;
@@ -284,7 +285,7 @@ protected void installSaaSBoost(String existingBucket) {
284285

285286
System.out.println("If your application runs on Windows and uses a shared file system, Active Directory is required.");
286287
System.out.print("Would you like to provision AWS Directory Service to use with FSx for Windows File Server (y or n)? ");
287-
boolean setupActiveDirectory = Keyboard.readBoolean();
288+
final boolean setupActiveDirectory = Keyboard.readBoolean();
288289

289290
System.out.println();
290291
outputMessage("===========================================================");
@@ -373,7 +374,7 @@ protected void installSaaSBoost(String existingBucket) {
373374
// project and have CloudFormation own building/copying the web files to S3.
374375
// Wait for completion and then build web app
375376
outputMessage("Build website and upload to S3");
376-
String webUrl = buildAndCopyWebApp();
377+
final String webUrl = buildAndCopyWebApp();
377378

378379
if (useAnalyticsModule) {
379380
LOGGER.info("Install metrics and analytics module");
@@ -391,8 +392,9 @@ protected void installSaaSBoost(String existingBucket) {
391392
protected void updateSaaSBoost() {
392393
LOGGER.info("Perform Update of AWS SaaS Boost deployment");
393394
outputMessage("******* W A R N I N G *******");
394-
outputMessage("Updating AWS SaaS Boost environment is an IRREVERSIBLE operation. You should test an updated install in a non-production environment\n" +
395-
"before updating a production environment. By continuing you understand and ACCEPT the RISKS!");
395+
outputMessage("Updating AWS SaaS Boost environment is an IRREVERSIBLE operation. You should test an "
396+
+ "updated install in a non-production environment\n"
397+
+ "before updating a production environment. By continuing you understand and ACCEPT the RISKS!");
396398
System.out.print("Enter y to continue with UPDATE of " + stackName + " or n to CANCEL: ");
397399
boolean continueUpgrade = Keyboard.readBoolean();
398400
if (!continueUpgrade) {
@@ -409,7 +411,7 @@ protected void updateSaaSBoost() {
409411
// Grab the current Lambda folder. We are going to upload the (potentially) modified Lambda functions to a
410412
// different S3 folder as a way to force CloudFormation to update the function resources. After we copy the
411413
// function code up to S3 in the new folder, we can delete the existing one to save space/money on S3.
412-
String existingLambdaSourceFolder = this.lambdaSourceFolder;
414+
final String existingLambdaSourceFolder = this.lambdaSourceFolder;
413415

414416
// Now create a new S3 folder for the Lambda functions so that CloudFormation sees a change that will
415417
// trigger an update function call to the Lambda service.
@@ -1019,7 +1021,7 @@ protected void setupQuickSight(String stackName, Map<String, String> outputs, St
10191021
*/
10201022
LOGGER.info("User for QuickSight: " + this.quickSightUsername);
10211023
LOGGER.info("Create data source in QuickSight for metrics Redshift table in Region: " + AWS_REGION.id());
1022-
CreateDataSourceResponse createDataSourceResponse = quickSight.createDataSource(CreateDataSourceRequest.builder()
1024+
final CreateDataSourceResponse createDataSourceResponse = quickSight.createDataSource(CreateDataSourceRequest.builder()
10231025
.dataSourceId("sb-" + this.envName + "-metrics-source")
10241026
.name("sb-" + this.envName + "-metrics-source")
10251027
.awsAccountId(accountId)
@@ -1270,14 +1272,6 @@ protected static boolean validateEnvironmentName(String envName) {
12701272
return valid;
12711273
}
12721274

1273-
// protected static boolean validateDomain(String domainName) {
1274-
// boolean valid = false;
1275-
// if (domainName != null) {
1276-
// valid = domainName.matches("^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Za-z]{2,6}$");
1277-
// }
1278-
// return valid;
1279-
// }
1280-
12811275
protected SaaSBoostArtifactsBucket getExistingSaaSBoostArtifactBucket() {
12821276
LOGGER.info("Getting existing SaaS Boost artifact bucket name from Parameter Store");
12831277
String artifactsBucket = null;
@@ -1685,7 +1679,7 @@ protected void deleteCloudFormationStack(final String stackName) {
16851679
}
16861680
}
16871681

1688-
protected boolean checkCloudFormationStack (final String stackName) {
1682+
protected boolean checkCloudFormationStack(final String stackName) {
16891683
LOGGER.info("checkCloudFormationStack stack " + stackName);
16901684
boolean exists = false;
16911685
try {
@@ -2077,7 +2071,7 @@ public static boolean isNotBlank(String str) {
20772071
* Generate a random password that matches the password policy of the Cognito user pool
20782072
* @return a random password that matches the password policy of the Cognito user pool
20792073
*/
2080-
public static String generatePassword (int passwordLength) {
2074+
public static String generatePassword(int passwordLength) {
20812075
if (passwordLength < 8) {
20822076
throw new IllegalArgumentException("Invalid password length. Minimum of 8 characters is required.");
20832077
}

0 commit comments

Comments
 (0)