-
CSR
-
Resolution: Approved
-
P4
-
None
-
source, binary
-
minimal
-
If the `Context.APPLET` environment property is specified - it is ignored when creating an `InitialContext` JNDI context. Removing this constant shouldn't pose any behaviourial change or compatibility risk.
-
Java API
-
SE
Summary
Applets are obsolete, and the javax.naming.Context.APPLET
constant has been deprecated for removal since Java 9.
The time has come to remove this constant.
Problem
JNDI dependency on the java.applet.Applet
has been removed in JDK9 with JDK-8051422. It made the Context.APPLET
environment property obsolete and to be ignored when javax.naming.InitialContext
is created.
The javax.naming.Context.APPLET
constant can now be removed.
Solution
Remove the APPLET
constant from the javax.naming.Context
class.
Specification
src/java.naming/share/classes/javax/naming/Context.java:
@@ -1061,27 +1061,4 @@ public Object removeFromEnvironment(String propName)
* @see #removeFromEnvironment(String)
*/
String LANGUAGE = "java.naming.language";
-
- /**
- * @deprecated An environment property with this name is ignored
- * while constructing an initial context.
- * This constant was originally used as a property name to specify an
- * {@code Applet} to retrieve parameters from, when creating an initial
- * context. Currently any applet properties that need to be passed to an
- * initial context should be copied into the environment hashtable:
- * <pre>{@code
- * Hashtable env = new Hashtable();
- * env.put(Context.INITIAL_CONTEXT_FACTORY,
- * ((Applet) this).getParameter(Context.INITIAL_CONTEXT_FACTORY));
- * env.put(Context.PROVIDER_URL,
- * ((Applet) this).getParameter(Context.PROVIDER_URL));
- * // ... other properties ...
- *
- * Context ctx = new InitialContext(env);
- * }</pre>
- *
- * @since 1.3
- */
- @Deprecated(since = "9", forRemoval = true)
- String APPLET = "java.naming.applet";
- csr of
-
JDK-8340359 Remove javax.naming.Context.APPLET
-
- Resolved
-
- relates to
-
JDK-8183386 Release Note: Context.APPLET is ignored when creating a JNDI InitialContext
-
- Closed
-