This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 0637f51436f131310930285e60eaeaebde8c18f9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Apr 14 10:56:02 2023 +0100

    Update reserved names
---
 java/jakarta/servlet/ServletContext.java |  7 +++----
 java/jakarta/servlet/ServletRequest.java | 19 +++++++------------
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/java/jakarta/servlet/ServletContext.java 
b/java/jakarta/servlet/ServletContext.java
index 8d40ab6db9..5054b3b796 100644
--- a/java/jakarta/servlet/ServletContext.java
+++ b/java/jakarta/servlet/ServletContext.java
@@ -356,8 +356,7 @@ public interface ServletContext {
      * supported attributes can be retrieved using 
<code>getAttributeNames</code>.
      * <p>
      * The attribute is returned as a <code>java.lang.Object</code> or some 
subclass. Attribute names should follow the
-     * same convention as package names. The Java Servlet API specification 
reserves names matching <code>java.*</code>,
-     * <code>javax.*</code>, and <code>sun.*</code>.
+     * same convention as package names. The Jakarta EE platform reserves 
names matching <code>jakarta.*</code>.
      *
      * @param name a <code>String</code> specifying the name of the attribute
      *
@@ -388,8 +387,8 @@ public interface ServletContext {
      * <p>
      * If a null value is passed, the effect is the same as calling 
<code>removeAttribute()</code>.
      * <p>
-     * Attribute names should follow the same convention as package names. The 
Java Servlet API specification reserves
-     * names matching <code>java.*</code>, <code>javax.*</code>, and 
<code>sun.*</code>.
+     * Attribute names should follow the same convention as package names. The 
Jakarta EE platform reserves names
+     * matching <code>jakarta.*</code>.
      *
      * @param name   a <code>String</code> specifying the name of the attribute
      * @param object an <code>Object</code> representing the attribute to be 
bound
diff --git a/java/jakarta/servlet/ServletRequest.java 
b/java/jakarta/servlet/ServletRequest.java
index eacc3af319..795502f3b4 100644
--- a/java/jakarta/servlet/ServletRequest.java
+++ b/java/jakarta/servlet/ServletRequest.java
@@ -46,10 +46,8 @@ public interface ServletRequest {
      * the client. Attributes can also be set programmatically using {@link 
ServletRequest#setAttribute}. This allows
      * information to be embedded into a request before a {@link 
RequestDispatcher} call.
      * <p>
-     * Attribute names should follow the same conventions as package names. 
Names beginning with <code>java.*</code> and
-     * <code>javax.*</code> are reserved for use by the Servlet specification. 
Names beginning with <code>sun.*</code>,
-     * <code>com.sun.*</code>, <code>oracle.*</code> and 
<code>com.oracle.*</code>) are reserved for use by Oracle
-     * Corporation.
+     * Attribute names should follow the same conventions as package names. 
Names beginning with <code>jakarta.*</code>
+     * are reserved for use by the Jakarta EE platform.
      *
      * @param name a <code>String</code> specifying the name of the attribute
      *
@@ -277,10 +275,9 @@ public interface ServletRequest {
      * Stores an attribute in this request. Attributes are reset between 
requests. This method is most often used in
      * conjunction with {@link RequestDispatcher}.
      * <p>
-     * Attribute names should follow the same conventions as package names. 
Names beginning with <code>java.*</code> and
-     * <code>javax.*</code> are reserved for use by the Servlet specification. 
Names beginning with <code>sun.*</code>,
-     * <code>com.sun.*</code>, <code>oracle.*</code> and 
<code>com.oracle.*</code>) are reserved for use by Oracle
-     * Corporation. <br>
+     * Attribute names should follow the same conventions as package names. 
Names beginning with <code>jakarta.*</code>
+     * are reserved for use by the Jakarta EE platform.
+     * <p>
      * If the object passed in is null, the effect is the same as calling 
{@link #removeAttribute}. <br>
      * It is warned that when the request is dispatched from the servlet 
resides in a different web application by
      * <code>RequestDispatcher</code>, the object set by this method may not 
be correctly retrieved in the caller
@@ -295,10 +292,8 @@ public interface ServletRequest {
      * Removes an attribute from this request. This method is not generally 
needed as attributes only persist as long as
      * the request is being handled.
      * <p>
-     * Attribute names should follow the same conventions as package names. 
Names beginning with <code>java.*</code> and
-     * <code>javax.*</code> are reserved for use by the Servlet specification. 
Names beginning with <code>sun.*</code>,
-     * <code>com.sun.*</code>, <code>oracle.*</code> and 
<code>com.oracle.*</code>) are reserved for use by Oracle
-     * Corporation.
+     * Attribute names should follow the same conventions as package names. 
Names beginning with <code>jakarta.*</code>
+     * are reserved for use by the Jakarta EE platform.
      *
      * @param name a <code>String</code> specifying the name of the attribute 
to remove
      */


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to