This is an automated email from the ASF dual-hosted git repository.

mthomsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 8d53f5d  NIFI-7497 Removed a few style check bugs that crept up in the 
last commit.
8d53f5d is described below

commit 8d53f5d0c91a4e759ea7033bb4d0143ba96d2c21
Author: Mike Thomsen <[email protected]>
AuthorDate: Fri Jul 10 15:56:41 2020 -0400

    NIFI-7497 Removed a few style check bugs that crept up in the last commit.
---
 .../provider/factory/CredentialPropertyDescriptors.java            | 7 +++++--
 .../provider/factory/strategies/AssumeRoleCredentialsStrategy.java | 4 ++--
 .../provider/factory/TestCredentialsProviderFactory.java           | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java
 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java
index fa4c1df..b60f949 100644
--- 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java
+++ 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialPropertyDescriptors.java
@@ -179,7 +179,7 @@ public class CredentialPropertyDescriptors {
             .sensitive(false)
             .description("Proxy port for cross-account access, if needed 
within your environment. This will configure a proxy to request for temporary 
access keys into another AWS account")
             .build();
-    
+
     public static final PropertyDescriptor ASSUME_ROLE_STS_ENDPOINT = new 
PropertyDescriptor.Builder()
             .name("assume-role-sts-endpoint")
             .displayName("Assume Role STS Endpoint")
@@ -187,6 +187,9 @@ public class CredentialPropertyDescriptors {
             .required(false)
             .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
             .sensitive(false)
-            .description("The default AWS Security Token Service (STS) 
endpoint (\"sts.amazonaws.com\") works for all accounts that are not for China 
(Beijing) region or GovCloud. You only need to set this property to 
\"sts.cn-north-1.amazonaws.com.cn\" when you are requesting session credentials 
for services in China(Beijing) region or to \"sts.us-gov-west-1.amazonaws.com\" 
for GovCloud.")
+            .description("The default AWS Security Token Service (STS) 
endpoint (\"sts.amazonaws.com\") works for " +
+                    "all accounts that are not for China (Beijing) region or 
GovCloud. You only need to set " +
+                    "this property to \"sts.cn-north-1.amazonaws.com.cn\" when 
you are requesting session credentials " +
+                    "for services in China(Beijing) region or to 
\"sts.us-gov-west-1.amazonaws.com\" for GovCloud.")
             .build();
 }
diff --git 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/strategies/AssumeRoleCredentialsStrategy.java
 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/strategies/AssumeRoleCredentialsStrategy.java
index adbfda9..32439a9 100644
--- 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/strategies/AssumeRoleCredentialsStrategy.java
+++ 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/strategies/AssumeRoleCredentialsStrategy.java
@@ -114,7 +114,7 @@ public class AssumeRoleCredentialsStrategy extends 
AbstractCredentialsStrategy {
                     .explanation("Assume role requires both arn and name to be 
set with External ID")
                     .build());
         }
-        
+
         // STS Endpoint should only be provided with viable Assume Role ARN 
and Name
         if (assumeRoleSTSEndpointIsSet && (!assumeRoleArnIsSet || 
!assumeRoleNameIsSet)) {
             validationFailureResults.add(new 
ValidationResult.Builder().input("Assume Role STS Endpoint")
@@ -162,7 +162,7 @@ public class AssumeRoleCredentialsStrategy extends 
AbstractCredentialsStrategy {
 
         AWSSecurityTokenService securityTokenService = new 
AWSSecurityTokenServiceClient(primaryCredentialsProvider, config);
         if (assumeRoleSTSEndpoint != null && !assumeRoleSTSEndpoint.isEmpty()) 
{
-               securityTokenService.setEndpoint(assumeRoleSTSEndpoint);
+            securityTokenService.setEndpoint(assumeRoleSTSEndpoint);
         }
         builder = new STSAssumeRoleSessionCredentialsProvider
                 .Builder(assumeRoleArn, assumeRoleName)
diff --git 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/credentials/provider/factory/TestCredentialsProviderFactory.java
 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/credentials/provider/factory/TestCredentialsProviderFactory.java
index 3e48e6b..e44b143 100644
--- 
a/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/credentials/provider/factory/TestCredentialsProviderFactory.java
+++ 
b/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/credentials/provider/factory/TestCredentialsProviderFactory.java
@@ -161,7 +161,7 @@ public class TestCredentialsProviderFactory {
         
runner.setProperty(CredentialPropertyDescriptors.ASSUME_ROLE_EXTERNAL_ID, 
"BogusExternalId");
         runner.assertNotValid();
     }
-    
+
     @Test
     public void testAssumeRoleSTSEndpointMissingArnAndName() throws Throwable {
         final TestRunner runner = 
TestRunners.newTestRunner(MockAWSProcessor.class);

Reply via email to