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: [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]