gnodet commented on code in PR #409:
URL: https://github.com/apache/maven-filtering/pull/409#discussion_r4111458225


##########
src/main/java/org/apache/maven/shared/filtering/BaseFilter.java:
##########
@@ -155,7 +155,7 @@ public List<FilterWrapper> getDefaultFilterWrappers(final 
AbstractMavenFiltering
             }
         }
 
-        final ValueSource propertiesValueSource = new 
PropertiesBasedValueSource(filterProperties);
+        final ValueSource propertiesValueSource = new 
RecursivePropertiesValueSource(filterProperties, getLogger());

Review Comment:
   This is pre-existing behavior in `PropertyUtils.getPropertyValue()` — the 
method's cycle-detection logic (the flat `valueChain` list) is **unchanged** by 
this PR. The only modification to `PropertyUtils.java` is widening the 
visibility from `private` to package-private.
   
   The same shared-reference false-positive exists when properties are loaded 
via `PropertyUtils.loadPropertyFile()`, which has used this exact algorithm for 
years (see also commit 811e367 / MSHARED-1290).
   
   Fixing the cycle-detection algorithm itself (e.g. switching to a proper 
recursion stack with backtracking) is a valid improvement, but it's orthogonal 
to this PR and should be tracked separately to avoid scope creep.



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

Reply via email to