You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2024/07/01 06:02:00 UTC
[jira] [Commented] (MJAVADOC-799) `defaultVersion` parameter has incorrect default value
[ https://issues.apache.org/jira/browse/MJAVADOC-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17861068#comment-17861068 ]
Michael Osipov commented on MJAVADOC-799:
-----------------------------------------
PRs welcome.
> `defaultVersion` parameter has incorrect default value
> ------------------------------------------------------
>
> Key: MJAVADOC-799
> URL: https://issues.apache.org/jira/browse/MJAVADOC-799
> Project: Maven Javadoc Plugin
> Issue Type: Bug
> Components: fix
> Affects Versions: 3.7.0
> Reporter: Marcono1234
> Priority: Trivial
>
> The {{defaultVersion}} parameter of the {{javadoc:fix}} has an inconsistent / incorrect default value (though I am not sure what the 'correct' value would be).
> h3. Inconsistencies
> - The Javadoc says "By default, it is {{$Id:$}}"
> - The actual and documented (on the Mojo help) default is {{$Id: $Id}}
> - The field in the code has the initial value {{$Id: $}}, with a space (using Unicode escapes)
> This value seems to have no effect because {{@Parameter#defaultValue}} overwrites the initial field value.
> Maybe it would therefore be easiest to:
> - Remove the "By default, it is ..." sentence from the Javadoc
> It is redundant because the Mojo help documents the {{@Parameter#defaultValue}}.
> - Remove the initial field value
> - Optionally remove the {{DEFAULT_VERSION_VALUE}} field and directly inline the value
> - Optionally change the default to the intended default value (whatever that is)
> h3. Historical background
> It seems originally the default value was supposed to be {{$Id$}}, but that was apparently causing issues with SVN, so commit [0cecfaa|https://github.com/apache/maven-javadoc-plugin/commit/0cecfaac31113f44c7db4c29021fa6f92877e458] tried to fix this by using the field initializer and Unicode escapes instead of {{default-value=}}. But this caused the first inconsistency because the Javadoc said {{$Id:$}} (without space) but the value was {{$Id: $}} (with space).
> Later commit [3dcd209|https://github.com/apache/maven-javadoc-plugin/commit/3dcd209a1595a95effd824be5a080f1d19f6f37e#diff-987d1364c087fc6899bde7ad2cdeba3e3c883d3c26e9ffbe86ecdce23d7ee1faR204] refactored the code to use {{@Parameter}} and added a {{defaultValue}}, but that is {{$Id: $Id}} (with duplicate "Id").
--
This message was sent by Atlassian Jira
(v8.20.10#820010)