8347985: Deprecate java.management Permission classes for removal

Reviewed-by: sspitsyn, rriggs
This commit is contained in:
Kevin Walls 2025-01-29 08:42:06 +00:00
parent 3af4cfc52d
commit 69ec45348a
5 changed files with 31 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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,6 +31,7 @@ package java.lang.management;
* @apiNote
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
* Consequently this class is deprecated for removal in a future release.
*
* @author Mandy Chung
* @since 1.5
@ -41,8 +42,11 @@ package java.lang.management;
* @see java.security.PermissionCollection
* @see java.lang.SecurityManager
*
* @deprecated This class was only useful in conjunction with the Security Manager,
* which is no longer supported. There is no replacement for this class.
*
*/
@Deprecated(since="25", forRemoval=true)
public final class ManagementPermission extends java.security.BasicPermission {
private static final long serialVersionUID = 1897496590799378737L;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -161,9 +161,14 @@ import java.security.Permission;
* @apiNote
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
* Consequently this class is deprecated for removal in a future release.
*
* @deprecated This class was only useful in conjunction with the Security Manager,
* which is no longer supported. There is no replacement for this class.
*
* @since 1.5
*/
@Deprecated(since="25", forRemoval=true)
public class MBeanPermission extends Permission {
private static final long serialVersionUID = -2416928705275160661L;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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,9 +67,14 @@ import java.util.StringTokenizer;
* @apiNote
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
* Consequently this class is deprecated for removal in a future release.
*
* @deprecated This class was only useful in conjunction with the Security Manager,
* which is no longer supported. There is no replacement for this class.
*
* @since 1.5
*/
@Deprecated(since="25", forRemoval=true)
public class MBeanServerPermission extends BasicPermission {
private static final long serialVersionUID = -5661980843569388590L;
@ -334,6 +339,7 @@ public class MBeanServerPermission extends BasicPermission {
* implementation from defining a PermissionCollection there with an
* optimized "implies" method.
*/
@SuppressWarnings("removal")
class MBeanServerPermissionCollection extends PermissionCollection {
/** @serial Null if no permissions in collection, otherwise a
single permission that is the union of all permissions that

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 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
@ -44,9 +44,14 @@ import java.io.ObjectInputStream;
* @apiNote
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
* Consequently this class is deprecated for removal in a future release.
*
* @deprecated This class was only useful in conjunction with the Security Manager,
* which is no longer supported. There is no replacement for this class.
*
* @since 1.5
*/
@Deprecated(since="25", forRemoval=true)
public class MBeanTrustPermission extends BasicPermission {
private static final long serialVersionUID = -2952178077029018140L;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -56,9 +56,14 @@ import java.security.BasicPermission;
* @apiNote
* This permission cannot be used for controlling access to resources
* as the Security Manager is no longer supported.
* Consequently this class is deprecated for removal in a future release.
*
* @deprecated This class was only useful in conjunction with the Security Manager,
* which is no longer supported. There is no replacement for this class.
*
* @since 1.5
*/
@Deprecated(since="25", forRemoval=true)
public final class SubjectDelegationPermission extends BasicPermission {
private static final long serialVersionUID = 1481618113008682343L;