AlexanderAshitkin commented on code in PR #391:
URL:
https://github.com/apache/maven-build-cache-extension/pull/391#discussion_r2404821859
##########
src/main/java/org/apache/maven/buildcache/BuildCacheMojosExecutionStrategy.java:
##########
@@ -388,7 +388,13 @@ boolean isParamsMatched(
return false;
}
- if (!Strings.CS.equals(currentValue, expectedValue)) {
+ // Apply ignorePattern filtering to expected value if it's an
array string representation
+ String filteredExpectedValue = expectedValue;
+ if (trackedProperty.getIgnorePattern() != null &&
expectedValue.startsWith("[") && expectedValue.endsWith("]")) {
+ filteredExpectedValue = filterArrayString(expectedValue,
trackedProperty.getIgnorePattern());
Review Comment:
I would avoid implementing this logic in this direction. In the event of an
infrequent pattern change, the cached value will be rebuilt and later reused.
Dissecting the cached value to ensure it can be accepted, seems not to be a big
win, appears counterintuitive and also adds a possibility of difficult to trace
errors (when the cache is restored incorrectly).
--
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]