This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-parent.git
The following commit(s) were added to refs/heads/master by this push:
new d59cfa1 Clarify @since Javadoc requirements
d59cfa1 is described below
commit d59cfa167c493fe6947283feec3f41539edd3ae5
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Nov 29 13:51:25 2026 -0500
Clarify @since Javadoc requirements
Omit redundant tags when an enclosing type has the same introduction
version. Require separate tags for members added in later releases.
Explicitly cover nested and annotation types and exclude test code.
---
AGENTS.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/AGENTS.md b/AGENTS.md
index 2ab02b5..11d50d5 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -66,7 +66,14 @@ mvn -B -DskipTests -DskipITs -ntp
No empty descriptions.
- Add Javadoc for every new type declaration, method, and other member,
with the standard exceptions (overrides, self-explanatory members,
trivial `equals`/`hashCode`).
- - Add an `@since` Javadoc tag to every new public or protected type,
method, or other member, except in test code.
+ - Outside test code, add `@since <version>` to every new public or
protected type or member,
+ unless an enclosing type already has an `@since` tag for the same version.
+ In that case, do not add an `@since` tag to the new type or member.
+ - Use the release version in which the type or member is first introduced.
+ - This rule includes classes, interfaces, enums, records, annotation types,
nested types,
+ constructors, methods, fields, and enum constants.
+ - Outside test code, public or protected members introduced in a later
release than their enclosing type
+ require their own `@since` tags.
### Prose