RFR: 8377857: Add since checker test for java.naming module
Jaikiran Pai
jpai at openjdk.org
Fri Feb 13 10:15:24 UTC 2026
On Fri, 13 Feb 2026 08:24:08 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Can I please get a review of this change which introduces a test to verify the usages of `@since` javadoc tags in the `java.naming` module? This addresses https://bugs.openjdk.org/browse/JDK-8377857.
>>
>> The `SinceChecker` test utility has been in use for several modules, but wasn't added for java.naming. The commit in this PR adds one for that module.
>>
>> The `SinceChecker` test utility does not handle the presence of a comma in (for example `@since X, Y`) correctly. The javadoc tag spec for `@since` allows that syntax https://docs.oracle.com/en/java/javase/25/docs/specs/javadoc/doc-comment-spec.html#since. As a workaround, the commit in this PR splits the `@since` on `javax.naming.InitialContext` class into two separate declarations (this too is allowed by the `@since` tag spec). I've verified that the generated javadoc continues to correctly show these values. I have also spoken to Nizar about this issue in SinceChecker and it will be addressed separately.
>
> src/java.naming/share/classes/javax/naming/InitialContext.java line 121:
>
>> 119: * NamingManager.setInitialContextFactoryBuilder
>> 120: * @since 1.3
>> 121: * @since JNDI 1.1
>
> Do we really need to keep `@since JNDI 1.1`?
Hello Alan, I am not familiar with the history of these JNDI APIs. I did a quick check and it looks like there are only a few places in the JDK where we refer to the JNDI version. For example, in `javax.naming.Context`:
> Prior to JNDI 1.2, all name arguments were treated as composite names.
and then in `javax.naming.directory.DirContext`:
* Prior to JNDI 1.2, this method
* returned a single schema object representing the class definition of
* the named object.
* Since JNDI 1.2, this method returns a {@code DirContext} containing
* all of the named object's class definitions.
and then are a few places which have this:
Use serialVersionUID from JNDI 1.1.1 for interoperability
on the `serialVersionUID` fields.
Do you suggest I remove the `@since JNDI 1.1` from `IntialContext`?
As a follow up, should we also remove/update the text refering to the JNDI versions in other places?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29705#discussion_r2803408352
More information about the core-libs-dev
mailing list