8338411: Implement JEP 486: Permanently Disable the Security Manager

Co-authored-by: Sean Mullan <mullan@openjdk.org>
Co-authored-by: Alan Bateman <alanb@openjdk.org>
Co-authored-by: Weijun Wang <weijun@openjdk.org>
Co-authored-by: Aleksei Efimov <aefimov@openjdk.org>
Co-authored-by: Brian Burkhalter <bpb@openjdk.org>
Co-authored-by: Daniel Fuchs <dfuchs@openjdk.org>
Co-authored-by: Harshitha Onkar <honkar@openjdk.org>
Co-authored-by: Joe Wang <joehw@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Justin Lu <jlu@openjdk.org>
Co-authored-by: Kevin Walls <kevinw@openjdk.org>
Co-authored-by: Lance Andersen <lancea@openjdk.org>
Co-authored-by: Naoto Sato <naoto@openjdk.org>
Co-authored-by: Roger Riggs <rriggs@openjdk.org>
Co-authored-by: Brent Christian <bchristi@openjdk.org>
Co-authored-by: Stuart Marks <smarks@openjdk.org>
Co-authored-by: Ian Graves <igraves@openjdk.org>
Co-authored-by: Phil Race <prr@openjdk.org>
Co-authored-by: Erik Gahlin <egahlin@openjdk.org>
Co-authored-by: Jaikiran Pai <jpai@openjdk.org>
Reviewed-by: kevinw, aivanov, rriggs, lancea, coffeys, dfuchs, ihse, erikj, cjplummer, coleenp, naoto, mchung, prr, weijun, joehw, azvegint, psadhukhan, bchristi, sundar, attila
This commit is contained in:
Sean Mullan 2024-11-12 17:16:15 +00:00
parent c12b386d19
commit db85090553
1885 changed files with 5528 additions and 65650 deletions

View file

@ -114,15 +114,6 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* specified for the <a
* href="#mode">{@code RandomAccessFile(File,String)}</a> constructor.
*
* <p>
* If there is a security manager, its {@code checkRead} method
* is called with the {@code pathname} argument
* as its argument to see if read access to the file is allowed.
* If the mode allows writing, the security manager's
* {@code checkWrite} method
* is also called with the {@code pathname} argument
* as its argument to see if write access to the file is allowed.
*
* @param pathname the system-dependent pathname string
* @param mode the access <a href="#mode">mode</a>
* @throws IllegalArgumentException if the mode argument is not equal
@ -135,13 +126,6 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* existing, writable regular file and a new regular file of
* that pathname cannot be created, or if some other error
* occurs while opening or creating the file
* @throws SecurityException if a security manager exists and its
* {@code checkRead} method denies read access to the file
* or the mode is {@code "rw"} and the security manager's
* {@code checkWrite} method denies write access to the file
* @see java.lang.SecurityException
* @see java.lang.SecurityManager#checkRead(java.lang.String)
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
*/
public RandomAccessFile(String pathname, String mode)
throws FileNotFoundException
@ -205,13 +189,6 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* updates to both the file's content and its metadata to be written, which
* generally requires at least one more low-level I/O operation.
*
* <p>If there is a security manager, its {@code checkRead} method is
* called with the pathname of the {@code file} argument as its
* argument to see if read access to the file is allowed. If the mode
* allows writing, the security manager's {@code checkWrite} method is
* also called with the pathname of the {@code file} argument to see if
* write access to the file is allowed.
*
* @param file the file object
* @param mode the access mode, as described
* <a href="#mode">above</a>
@ -225,12 +202,6 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
* an existing, writable regular file and a new regular file of
* that pathname cannot be created, or if some other error
* occurs while opening or creating the file
* @throws SecurityException if a security manager exists and its
* {@code checkRead} method denies read access to the file
* or the mode is {@code "rw"} and the security manager's
* {@code checkWrite} method denies write access to the file
* @see java.lang.SecurityManager#checkRead(java.lang.String)
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
* @see java.nio.channels.FileChannel#force(boolean)
*/
@SuppressWarnings("this-escape")