You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "NishthaShah (via GitHub)" <gi...@apache.org> on 2023/05/19 12:30:40 UTC

[GitHub] [hadoop] NishthaShah commented on a diff in pull request #5669: HADOOP-17518. Update the regex to A-Z

NishthaShah commented on code in PR #5669:
URL: https://github.com/apache/hadoop/pull/5669#discussion_r1198905374


##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/lib/util/TestCheck.java:
##########
@@ -116,6 +116,16 @@ public void validIdentifierInvalid3() throws Exception {
     Check.validIdentifier("1", 1, "");
   }
 
+  @Test(expected = IllegalArgumentException.class)
+  public void validIdentifierInvalid4() throws Exception {
+    Check.validIdentifier("`a", 1, "");
+  }
+
+  @Test(expected = IllegalArgumentException.class)
+  public void validIdentifierInvalid5() throws Exception {
+    Check.validIdentifier("[a", 1, "");
+  }
+

Review Comment:
   Just to clarify my understanding, I have added tests and [expecting it would throw exceptions](https://github.com/apache/hadoop/pull/5669/files#diff-2704e2ed55a403b0863f01a628e5b9d8c19db8f58752d758bacc6dd8777b863dR119) in case the first character is not from a-z, A-Z and _ with my fix. So this test cases without my fix should be failing. Are you seeing something different?



-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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