You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/05 10:37:34 UTC

[GitHub] [hadoop-ozone] supratimdeka commented on a change in pull request #293: HDDS-2530. Sonar : refactor verifyResourceName in HddsClientUtils to fix Sonar errors

supratimdeka commented on a change in pull request #293: HDDS-2530. Sonar : refactor verifyResourceName in HddsClientUtils to fix Sonar errors
URL: https://github.com/apache/hadoop-ozone/pull/293#discussion_r354228899
 
 

 ##########
 File path: hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/client/HddsClientUtils.java
 ##########
 @@ -150,6 +142,49 @@ public static void verifyResourceName(String resName)
       throw new IllegalArgumentException("Bucket or Volume name "
           + "cannot end with a period or dash");
     }
+  }
+
+  private static boolean isLowercaseAlphanumeric(char c) {
+    return (Character.toString(c).matches("[a-z0-9]"));
+  }
+
+  private static boolean isSupportedCharacter(char c) {
+    return (c == '.' || c == '-' || isLowercaseAlphanumeric(c));
+  }
+
+  private static void doCharacterChecks(char currChar, char prev) {
+    if (currChar > 'A' && currChar < 'Z') {
 
 Review comment:
   Done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org