gnodet commented on PR #374: URL: https://github.com/apache/maven-filtering/pull/374#issuecomment-5813758037
The history confirms this is exactly a case of fields added after the `copyOf()` fix was written: - The `copyOf()` method was originally fixed in June 2019 (fixing the bug where it was copying from `mre` instead of `this`) - `delimiters` actually predates even that fix but was silently missed in 2019 - `flatten` was added January 2020 ([MRESOURCES-250]) - `propertiesEncoding` was added July 2020 ([SHARED-934]) - `interpolatorCustomizer` was added August 2024 ([MSHARED-1412]) Each time a new field was added, nobody updated `copyOf()`. Thanks for catching all four! Regarding @rmannibucau's comment about `interpolatorCustomizer`: since the field is explicitly set by the caller on the original execution object, copying the reference is the correct behavior — if a consumer has configured a customizer, they expect the clone to honor it too. A javadoc note would be welcome but not a blocker. -- 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]
