From 49e2a6b696c2063f0b4331b0a6d064852d676fcd Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Sat, 14 Feb 2026 09:12:51 +0000 Subject: [PATCH] 8377857: Add since checker test for java.naming module Reviewed-by: alanb --- .../classes/javax/naming/InitialContext.java | 4 +-- .../java.naming/JavaNamingCheckSince.java | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 test/jdk/tools/sincechecker/modules/java.naming/JavaNamingCheckSince.java diff --git a/src/java.naming/share/classes/javax/naming/InitialContext.java b/src/java.naming/share/classes/javax/naming/InitialContext.java index f2ab1676f4e..a66e843e641 100644 --- a/src/java.naming/share/classes/javax/naming/InitialContext.java +++ b/src/java.naming/share/classes/javax/naming/InitialContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -117,7 +117,7 @@ import com.sun.naming.internal.ResourceManager; * @see Context * @see NamingManager#setInitialContextFactoryBuilder * NamingManager.setInitialContextFactoryBuilder - * @since 1.3, JNDI 1.1 + * @since 1.3 */ public class InitialContext implements Context { diff --git a/test/jdk/tools/sincechecker/modules/java.naming/JavaNamingCheckSince.java b/test/jdk/tools/sincechecker/modules/java.naming/JavaNamingCheckSince.java new file mode 100644 index 00000000000..6d99ab9b727 --- /dev/null +++ b/test/jdk/tools/sincechecker/modules/java.naming/JavaNamingCheckSince.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary Test for "@since" in java.naming module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker java.naming + */