AlexanderAshitkin commented on code in PR #391:
URL:
https://github.com/apache/maven-build-cache-extension/pull/391#discussion_r2404811247
##########
src/main/java/org/apache/maven/buildcache/BuildCacheMojosExecutionStrategy.java:
##########
@@ -434,6 +440,55 @@ private static String normalizedPath(Path path, Path
baseDirPath) {
return normalizedPath;
}
+ /**
+ * Filters array values based on ignore pattern and converts to string
representation.
+ */
+ private static String filterAndStringifyArray(Object array, String
ignorePattern) {
+ if (ignorePattern == null) {
+ return ArrayUtils.toString(array);
+ }
+
+ java.util.regex.Pattern pattern =
java.util.regex.Pattern.compile(ignorePattern);
Review Comment:
1) ignore patterns will be of a small and finite count. please consider to
cache them.
2) please consider renaming `pattern` -> `excludePattern`
--
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]