Skip to content

Commit

Permalink
8298966: Deprecate JMX Subject Delegation and the method JMXConnector…
Browse files Browse the repository at this point in the history
….getMBeanServerConnection(Subject) for removal.

Reviewed-by: mchung, dfuchs
  • Loading branch information
kevinjwalls committed Mar 14, 2023
1 parent 10f1674 commit 4e631fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, 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
Expand Down Expand Up @@ -390,6 +390,7 @@ public synchronized MBeanServerConnection getMBeanServerConnection()
return getMBeanServerConnection(null);
}

@SuppressWarnings("removal")
public synchronized MBeanServerConnection
getMBeanServerConnection(Subject delegationSubject)
throws IOException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, 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
Expand Down Expand Up @@ -168,7 +168,13 @@ public MBeanServerConnection getMBeanServerConnection()
* cannot be created, for instance because the connection to the remote
* MBean server has not yet been established (with the {@link #connect(Map)
* connect} method), or it has been closed, or it has broken.
*
* @deprecated This method supported the legacy Subject Delegation feature,
* and is only useful in conjunction with other APIs which are deprecated and
* subject to removal in a future release. Consequently, this method is also
* deprecated and subject to removal. There is no replacement.
*/
@Deprecated(since="21", forRemoval=true)
public MBeanServerConnection getMBeanServerConnection(
Subject delegationSubject)
throws IOException;
Expand Down

1 comment on commit 4e631fa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.