You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/08/17 16:01:41 UTC

(maven-doxia) branch master updated: Make the deprecation of AbstractParser#getBasedir visible to callers

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


The following commit(s) were added to refs/heads/master by this push:
     new ad680f27 Make the deprecation of AbstractParser#getBasedir visible to callers
ad680f27 is described below

commit ad680f272112ed9d5a3ed7501693489a5d5f91f7
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Aug 17 16:56:40 2026 +0200

    Make the deprecation of AbstractParser#getBasedir visible to callers
    
    The javadoc has carried an @deprecated tag since DOXIA-373 was raised, but
    without the annotation no caller ever saw a warning. Anyone subclassing
    AbstractParser could reach for it and never learn it does not work in
    multi-module builds.
    
    This surfaces four warnings inside Doxia itself, at the MacroRequest
    construction in the APT, FML, xdoc and XHTML5 parsers. They are left in place:
    there is no replacement for the basedir the parsers need, and suppressing them
    would hide DOXIA-373 in the one codebase able to fix it.
    
    Verified: mvn clean verify -> 667 tests pass, japicmp clean, and the only new
    warnings are the four expected call sites
---
 .../src/main/java/org/apache/maven/doxia/parser/AbstractParser.java      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
index 3551fe66..c6c08881 100644
--- a/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
+++ b/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractParser.java
@@ -159,6 +159,7 @@ public abstract class AbstractParser implements Parser, MacroExecutor {
      * @return the base directory
      * @deprecated this does not work in multi-module builds, see DOXIA-373
      */
+    @Deprecated
     protected File getBasedir() {
         // TODO: This is baaad, it should come in with the request.
         // (this is only used for macro requests, see AptParser)