gnodet-bot commented on code in PR #397:
URL: https://github.com/apache/maven-filtering/pull/397#discussion_r4101890710
##########
src/main/java/org/apache/maven/shared/filtering/FilteringUtils.java:
##########
@@ -294,23 +294,84 @@ static boolean isEmpty(final String string) {
* @param to the destination file
* @param encoding the file output encoding (only if wrappers is not empty)
* @param wrappers array of {@link FilterWrapper}
+ * @param overwrite unused
Review Comment:
⚠️ **Inaccurate Javadoc:** The `@param overwrite` says "unused" but the
implementation on line 304 actually uses it (`overwrite ?
ChangeDetection.ALWAYS : ChangeDetection.CONTENT`). The parameter controls
behavior — it's not unused.
```suggestion
* @param overwrite if {@code true}, uses {@link
ChangeDetection#ALWAYS}; if {@code false}, uses {@link ChangeDetection#CONTENT}
```
##########
src/main/java/org/apache/maven/shared/filtering/MavenResourcesExecution.java:
##########
@@ -90,7 +90,9 @@ public class MavenResourcesExecution extends
AbstractMavenFilteringRequest {
* Overwrite existing files even if the destination files are newer.
<code>false</code> by default.
*
* @since 1.0-beta-2
+ * @deprecated Use {@link #getChangeDetection()} / {@link
#setChangeDetection(ChangeDetection)} instead.
*/
+ @Deprecated
private boolean overwrite = false;
Review Comment:
💡 **Dead field:** After this refactor, `overwrite` is never read or written
directly — `setOverwrite()` delegates to `setChangeDetection()` and
`isOverwrite()` reads from `getChangeDetection()`. The field could be removed
entirely (the `@Deprecated` annotation on it is misleading since it's not
API-visible). Not blocking, but it's confusing dead code.
--
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]