ivanzlenko commented on code in PR #4914:
URL: https://github.com/apache/ozone/pull/4914#discussion_r1233256157


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/utils/SelfSignedCertificate.java:
##########
@@ -307,12 +307,12 @@ private ASN1Object addOtherNameAsn1Object(String name) {
     public X509CertificateHolder build()
         throws SCMSecurityException, IOException {
       Preconditions.checkNotNull(key, "Key cannot be null");
-      Preconditions.checkArgument(Strings.isNotBlank(subject), "Subject " +
-          "cannot be blank");
-      Preconditions.checkArgument(Strings.isNotBlank(clusterID), "Cluster ID " 
+
-          "cannot be blank");
-      Preconditions.checkArgument(Strings.isNotBlank(scmID), "SCM ID cannot " +
-          "be blank");
+      Preconditions.checkArgument(StringUtils.isNotBlank(subject),
+          "Subject " + "cannot be blank");

Review Comment:
   There is no need for concatenation here anymore



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/utils/SelfSignedCertificate.java:
##########
@@ -307,12 +307,12 @@ private ASN1Object addOtherNameAsn1Object(String name) {
     public X509CertificateHolder build()
         throws SCMSecurityException, IOException {
       Preconditions.checkNotNull(key, "Key cannot be null");
-      Preconditions.checkArgument(Strings.isNotBlank(subject), "Subject " +
-          "cannot be blank");
-      Preconditions.checkArgument(Strings.isNotBlank(clusterID), "Cluster ID " 
+
-          "cannot be blank");
-      Preconditions.checkArgument(Strings.isNotBlank(scmID), "SCM ID cannot " +
-          "be blank");
+      Preconditions.checkArgument(StringUtils.isNotBlank(subject),
+          "Subject " + "cannot be blank");
+      Preconditions.checkArgument(StringUtils.isNotBlank(clusterID),
+          "Cluster ID " + "cannot be blank");

Review Comment:
   There is no need for concatenation here anymore



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/security/x509/certificate/utils/SelfSignedCertificate.java:
##########
@@ -307,12 +307,12 @@ private ASN1Object addOtherNameAsn1Object(String name) {
     public X509CertificateHolder build()
         throws SCMSecurityException, IOException {
       Preconditions.checkNotNull(key, "Key cannot be null");
-      Preconditions.checkArgument(Strings.isNotBlank(subject), "Subject " +
-          "cannot be blank");
-      Preconditions.checkArgument(Strings.isNotBlank(clusterID), "Cluster ID " 
+
-          "cannot be blank");
-      Preconditions.checkArgument(Strings.isNotBlank(scmID), "SCM ID cannot " +
-          "be blank");
+      Preconditions.checkArgument(StringUtils.isNotBlank(subject),
+          "Subject " + "cannot be blank");
+      Preconditions.checkArgument(StringUtils.isNotBlank(clusterID),
+          "Cluster ID " + "cannot be blank");
+      Preconditions.checkArgument(StringUtils.isNotBlank(scmID),
+          "SCM ID cannot " + "be blank");

Review Comment:
   There is no need for concatenation here anymore



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to