Skip to content

Commit 9eb4311

Browse files
committed
Fix jakartaee#443 Remove references to the SecurityManager and associated APIs
1 parent ba27532 commit 9eb4311

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

api/src/main/java/jakarta/servlet/ServletContext.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
2+
* Copyright (c) 1997, 2023 Oracle and/or its affiliates and others.
33
* All rights reserved.
44
* Copyright 2004 The Apache Software Foundation
55
*
@@ -1246,8 +1246,6 @@ public interface ServletContext {
12461246
*
12471247
* @return the class loader of the web application represented by this ServletContext
12481248
*
1249-
* @throws SecurityException if a security manager denies access to the requested class loader
1250-
*
12511249
* @since Servlet 3.0
12521250
*/
12531251
public ClassLoader getClassLoader();

api/src/main/java/jakarta/servlet/http/Cookie.java

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021 Oracle and/or its affiliates and others.
2+
* Copyright (c) 1997, 2023 Oracle and/or its affiliates and others.
33
* All rights reserved.
44
* Copyright 2004 The Apache Software Foundation
55
*
@@ -19,8 +19,6 @@
1919
package jakarta.servlet.http;
2020

2121
import java.io.Serializable;
22-
import java.security.AccessController;
23-
import java.security.PrivilegedAction;
2422
import java.text.MessageFormat;
2523
import java.util.Collections;
2624
import java.util.Locale;
@@ -76,12 +74,8 @@ public class Cookie implements Cloneable, Serializable {
7674
private static final ResourceBundle lStrings = ResourceBundle.getBundle(LSTRING_FILE);
7775

7876
static {
79-
boolean enforced = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
80-
@Override
81-
public Boolean run() {
82-
return Boolean.valueOf(System.getProperty("org.glassfish.web.rfc2109_cookie_names_enforced", "true"));
83-
}
84-
});
77+
boolean enforced = Boolean.valueOf(System.getProperty("org.glassfish.web.rfc2109_cookie_names_enforced", "true"));
78+
8579
if (enforced) {
8680
TSPECIALS = "/()<>@,;:\\\"[]?={} \t";
8781
} else {

spec/src/main/asciidoc/servlet-spec-body.adoc

+6-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:sectnums!:
66
== Jakarta Servlet Specification, Version {spec-version}
77

8-
Copyright (c) 2022 Contributors to the Eclipse Foundation.
8+
Copyright (c) 2023 Contributors to the Eclipse Foundation.
99

1010
Eclipse is a registered trademark of the Eclipse Foundation. Jakarta
1111
is a trademark of the Eclipse Foundation. Oracle and Java are
@@ -221,12 +221,8 @@ servlet, may modify responses produced by servlets before sending them
221221
to the clients, or may respond to requests without delivering them to
222222
the servlet under the compliance with RFC 7234.
223223

224-
A servlet container may place security
225-
restrictions on the environment in which a servlet executes. These
226-
restrictions may be placed using the permission architecture defined
227-
by the Java platform. For example some application servers may limit the
228-
creation of a `Thread` object to insure that other components of the
229-
container are not negatively impacted.
224+
A servlet container may place security restrictions on the environment in which
225+
a servlet executes.
230226

231227
Java SE 11 is the minimum version of the
232228
underlying Java platform with which servlet containers must be built.
@@ -8572,6 +8568,9 @@ behaviour is aligned with `getHeader()`.
85728568
link:https://github.com/eclipse-ee4j/servlet-api/issues/415[Issue 415]::
85738569
Add overloaded `setCharacterEncoding()` methods that support `Charset`.
85748570

8571+
link:https://github.com/eclipse-ee4j/servlet-api/issues/443[Issue 443]::
8572+
Remove references to the SecurityManager and associated APIs.
8573+
85758574
link:https://github.com/eclipse-ee4j/servlet-api/issues/453[Issue 453]::
85768575
Add a security warning and a clarification of canonicalization requirements to
85778576
all `ServletContext` methods that accept a path parameter.

0 commit comments

Comments
 (0)