diff --git a/src/java.base/share/classes/java/io/FilePermission.java b/src/java.base/share/classes/java/io/FilePermission.java
index 1330766b078..aa6f11e00ee 100644
--- a/src/java.base/share/classes/java/io/FilePermission.java
+++ b/src/java.base/share/classes/java/io/FilePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, 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
@@ -67,7 +67,7 @@
*
* The actions string is converted to lowercase before processing.
*
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
@@ -83,6 +83,7 @@
* @serial exclude
*/
+@Deprecated(since="25", forRemoval=true)
public final class FilePermission extends Permission implements Serializable {
/**
@@ -1115,6 +1116,7 @@ public FilePermissionCollection() {
* has been marked readonly
*/
@Override
+ @SuppressWarnings("removal")
public void add(Permission permission) {
if (! (permission instanceof FilePermission fp))
throw new IllegalArgumentException("invalid permission: "+
@@ -1152,6 +1154,7 @@ public void add(Permission permission) {
* the set, false if not.
*/
@Override
+ @SuppressWarnings("removal")
public boolean implies(Permission permission) {
if (! (permission instanceof FilePermission fperm))
return false;
@@ -1180,6 +1183,7 @@ public boolean implies(Permission permission) {
* @return an enumeration of all the FilePermission objects.
*/
@Override
+ @SuppressWarnings("removal")
public Enumeration elements() {
return perms.elements();
}
diff --git a/src/java.base/share/classes/java/io/SerializablePermission.java b/src/java.base/share/classes/java/io/SerializablePermission.java
index 48be2eabf1f..eb8117bbd81 100644
--- a/src/java.base/share/classes/java/io/SerializablePermission.java
+++ b/src/java.base/share/classes/java/io/SerializablePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, 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
@@ -36,7 +36,7 @@
* no actions list; you either have the named permission
* or you don't.
*
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
@@ -51,6 +51,7 @@
/* code was borrowed originally from java.lang.RuntimePermission. */
+@Deprecated(since="25", forRemoval=true)
public final class SerializablePermission extends BasicPermission {
@java.io.Serial
diff --git a/src/java.base/share/classes/java/lang/RuntimePermission.java b/src/java.base/share/classes/java/lang/RuntimePermission.java
index dc158be409f..4f5a3d60a7a 100644
--- a/src/java.base/share/classes/java/lang/RuntimePermission.java
+++ b/src/java.base/share/classes/java/lang/RuntimePermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, 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
@@ -38,7 +38,7 @@
* An asterisk may appear at the end of the name, following a ".",
* or by itself, to signify a wildcard match. For example: "loadLibrary.*"
* and "*" signify a wildcard match, while "*loadLibrary" and "a*b" do not.
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
@@ -53,6 +53,7 @@
* @since 1.2
*/
+@Deprecated(since="25", forRemoval=true)
public final class RuntimePermission extends BasicPermission {
@java.io.Serial
diff --git a/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java b/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java
index 4910109be32..af86c99fa40 100644
--- a/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java
+++ b/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, 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
@@ -28,7 +28,7 @@
/**
* The Permission class for reflective operations.
*
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
@@ -38,6 +38,7 @@
*
* @since 1.2
*/
+@Deprecated(since="25", forRemoval=true)
public final
class ReflectPermission extends java.security.BasicPermission {
diff --git a/src/java.base/share/classes/java/nio/file/LinkPermission.java b/src/java.base/share/classes/java/nio/file/LinkPermission.java
index e53b6aebc1f..7a0095b3101 100644
--- a/src/java.base/share/classes/java/nio/file/LinkPermission.java
+++ b/src/java.base/share/classes/java/nio/file/LinkPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2025, 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
@@ -30,12 +30,13 @@
/**
* The {@code Permission} class for link creation operations.
*
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
* @since 1.7
*/
+@Deprecated(since="25", forRemoval=true)
public final class LinkPermission extends BasicPermission {
@java.io.Serial
static final long serialVersionUID = -1441492453772213220L;
diff --git a/src/java.base/share/classes/java/util/PropertyPermission.java b/src/java.base/share/classes/java/util/PropertyPermission.java
index f5c6db0b781..85b48359c90 100644
--- a/src/java.base/share/classes/java/util/PropertyPermission.java
+++ b/src/java.base/share/classes/java/util/PropertyPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2025, 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
@@ -54,7 +54,7 @@
*
* The actions string is converted to lowercase before processing.
*
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
@@ -70,6 +70,7 @@
* @serial exclude
*/
+@Deprecated(since="25", forRemoval=true)
public final class PropertyPermission extends BasicPermission {
/**
@@ -412,6 +413,7 @@ final class PropertyPermissionCollection extends PermissionCollection
* Key is property name; value is PropertyPermission.
* Not serialized; see serialization section at end of class.
*/
+ @SuppressWarnings("removal")
private transient ConcurrentHashMap perms;
/**
@@ -443,6 +445,7 @@ public PropertyPermissionCollection() {
* object has been marked readonly
*/
@Override
+ @SuppressWarnings("removal")
public void add(Permission permission) {
if (! (permission instanceof PropertyPermission pp))
throw new IllegalArgumentException("invalid permission: "+
@@ -487,6 +490,7 @@ public void add(Permission permission) {
* the set, false if not.
*/
@Override
+ @SuppressWarnings("removal")
public boolean implies(Permission permission) {
if (! (permission instanceof PropertyPermission pp))
return false;
@@ -613,6 +617,7 @@ private void writeObject(ObjectOutputStream out) throws IOException {
* perms field. Reads in all_allowed.
*/
@java.io.Serial
+ @SuppressWarnings("removal")
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
diff --git a/src/java.logging/share/classes/java/util/logging/LoggingPermission.java b/src/java.logging/share/classes/java/util/logging/LoggingPermission.java
index c48d5ba9f06..d9cf9b58bbd 100644
--- a/src/java.logging/share/classes/java/util/logging/LoggingPermission.java
+++ b/src/java.logging/share/classes/java/util/logging/LoggingPermission.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2025, 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
@@ -31,7 +31,7 @@
* This class is for logging permissions. Currently there is only one
* LoggingPermission named "control".
*
- * @apiNote
+ * @deprecated
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
*
@@ -45,6 +45,7 @@
*
*/
+@Deprecated(since="25", forRemoval=true)
public final class LoggingPermission extends java.security.BasicPermission {
private static final long serialVersionUID = 63564341580231582L;