zentol commented on a change in pull request #11430: [FLINK-16633][AZP] Fix
builds without s3 credentials
URL: https://github.com/apache/flink/pull/11430#discussion_r393857965
##########
File path:
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/s3/S3TestCredentials.java
##########
@@ -44,7 +44,8 @@
* of this JVM.
*/
public static boolean credentialsAvailable() {
- return S3_TEST_BUCKET != null && S3_TEST_ACCESS_KEY != null &&
S3_TEST_SECRET_KEY != null;
Review comment:
Add a simple utility function `boolean isNotEmpty(@Nullable String)` that
you call 3 times. This is both more readable and would've prevented bugs like
in the second line below where `S3_TEST_SECRET_KEY.isEmpty()` is missing a
negation.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services