gemmellr commented on code in PR #1534:
URL: https://github.com/apache/activemq/pull/1534#discussion_r2528752745
##########
activemq-broker/src/main/java/org/apache/activemq/broker/jmx/AnnotatedMBean.java:
##########
@@ -205,8 +204,7 @@ public Object invoke(String s, Object[] objects, String[]
strings) throws MBeanE
objects = (objects == null) ? new Object[]{} : objects;
JMXAuditLogEntry entry = null;
if (audit != OFF) {
- // [AMQ-9563] TODO: JDK 21 use Subject.current() instead
- Subject subject =
Subject.getSubject(AccessController.getContext());
+ Subject subject = SecurityManagerShim.currentSubject();
Review Comment:
If there are no other SM / related API usage to handle then you wouldn't
need it all, just the Subject method.
However I'm not seeing how duplicating a sizable complex class that may need
to be updated, just to change a couple lines, would really be better than
having 2 new tiny classes , that likely won't ever change, to do the switch out
and avoid the need to duplicate the complex class?
For sure the classes don't need to be in their own module if that's what you
dislike about it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact