markap14 commented on code in PR #7315: URL: https://github.com/apache/nifi/pull/7315#discussion_r1239041303
########## nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java: ########## @@ -214,6 +214,8 @@ public final class StandardProcessGroup implements ProcessGroup { private static final String DEFAULT_FLOWFILE_EXPIRATION = "0 sec"; private static final long DEFAULT_BACKPRESSURE_OBJECT = 10_000L; private static final String DEFAULT_BACKPRESSURE_DATA_SIZE = "1 GB"; + private static final String VALID_DIRECTORY_NAME_REGEX = "[\\s\\<\\>:\\'\\\"\\/\\\\\\|\\?\\*]"; Review Comment: I don't think `VALID_DIRECTORY_NAME_REGEX` is really what this is - it is more an `INVALID_DIRECTORY_NAME_CHARACTERS`. Also, the `Pattern` class is thread-safe so we should instead use: ``` private static final Pattern INVALID_DIRECTORY_CHARACTER_REGEX = Pattern.compile("..."); ``` instead of calling `Pattern.compile` every time it's used. -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org