RFR: 8377857: Add since checker test for java.naming module
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-spe.... 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. ------------- Commit messages: - 8377857: Add since checker test for java.naming module Changes: https://git.openjdk.org/jdk/pull/29705/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29705&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8377857 Stats: 32 lines in 2 files changed: 30 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29705.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29705/head:pull/29705 PR: https://git.openjdk.org/jdk/pull/29705
On Fri, 13 Feb 2026 02:00:09 GMT, Jaikiran Pai <jpai@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-spe.... 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`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29705#discussion_r2802901491
On Fri, 13 Feb 2026 08:24:08 GMT, Alan Bateman <alanb@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-spe.... 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
On Fri, 13 Feb 2026 10:11:56 GMT, Jaikiran Pai <jpai@openjdk.org> wrote:
Do you suggest I remove the `@since JNDI 1.1` from `IntialContext`?
Yes, I think we should remove it with this update.
As a follow up, should we also remove/update the text refering to the JNDI versions in other places?
That would be good, but low priority of course. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29705#discussion_r2803625500
On Fri, 13 Feb 2026 10:58:24 GMT, Alan Bateman <alanb@openjdk.org> wrote:
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?
Do you suggest I remove the `@since JNDI 1.1` from `IntialContext`?
Yes, I think we should remove it with this update.
As a follow up, should we also remove/update the text refering to the JNDI versions in other places?
That would be good, but low priority of course.
Done, I've updated the PR to remove the `@since JNDI 1.1` from `InitialContext`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29705#discussion_r2803726256
On Fri, 13 Feb 2026 11:24:43 GMT, Jaikiran Pai <jpai@openjdk.org> wrote:
Do you suggest I remove the `@since JNDI 1.1` from `IntialContext`?
Yes, I think we should remove it with this update.
As a follow up, should we also remove/update the text refering to the JNDI versions in other places?
That would be good, but low priority of course.
Done, I've updated the PR to remove the `@since JNDI 1.1` from `InitialContext`.
Thanks. When I initially say it when I expected there might be more tags left over from before JNDI was integrated in JDK 1.3 but it seems not. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29705#discussion_r2804316331
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-spe.... 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.
Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision: remove reference to JNDI 1.1 in InitialContext ------------- Changes: - all: https://git.openjdk.org/jdk/pull/29705/files - new: https://git.openjdk.org/jdk/pull/29705/files/aeb89dc7..c92b0872 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=29705&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29705&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/29705.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29705/head:pull/29705 PR: https://git.openjdk.org/jdk/pull/29705
On Fri, 13 Feb 2026 11:28:16 GMT, Jaikiran Pai <jpai@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-spe.... 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.
Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
remove reference to JNDI 1.1 in InitialContext
Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/29705#pullrequestreview-3797389263
On Fri, 13 Feb 2026 11:28:16 GMT, Jaikiran Pai <jpai@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-spe.... 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.
Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
remove reference to JNDI 1.1 in InitialContext
Thank you Alan for the review. ------------- PR Comment: https://git.openjdk.org/jdk/pull/29705#issuecomment-3901539802
On Fri, 13 Feb 2026 02:00:09 GMT, Jaikiran Pai <jpai@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-spe.... 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.
This pull request has now been integrated. Changeset: 49e2a6b6 Author: Jaikiran Pai <jpai@openjdk.org> URL: https://git.openjdk.org/jdk/commit/49e2a6b696c2063f0b4331b0a6d064852d676fcd Stats: 31 lines in 2 files changed: 29 ins; 0 del; 2 mod 8377857: Add since checker test for java.naming module Reviewed-by: alanb ------------- PR: https://git.openjdk.org/jdk/pull/29705
participants (2)
-
Alan Bateman
-
Jaikiran Pai