dtspence commented on code in PR #3549:
URL: https://github.com/apache/accumulo/pull/3549#discussion_r1245683969
##########
core/src/main/java/org/apache/accumulo/core/metadata/ValidationUtil.java:
##########
@@ -62,9 +62,12 @@ public static void validateRFileName(String fileName) {
public static void validateFileName(String fileName) {
Objects.requireNonNull(fileName);
- if (!fileName.matches("[\\dA-Za-z._-]+")) {
- throw new IllegalArgumentException(
- "Provided filename (" + fileName + ") contains invalid characters.");
+ for (int i = 0; i < fileName.length(); i++) {
+ final char ch = fileName.charAt(i);
+ if (!(Character.isLetterOrDigit(ch) || ch == '-' || ch == '.' || ch ==
'_')) {
+ throw new IllegalArgumentException(
+ "Provided filename (" + fileName + ") contains invalid
characters.");
+ }
Review Comment:
The link to the benchmark is below. The `gc-test-update` branch has not been
merged yet, it has updates from #3499. It should be possible to run with `mvn
verify`:
https://github.com/dtspence/accumulo-jmh-test/tree/gc-test-update
--
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]