I have a bean that implements NotificationPublisherAware
in order to send JMX notifications.
I put then this bean to MBeanExporter
's Bean Map:
Map<String, Object> beans = new HashMap<>();
String key = someName;
beans.put(key, jmxNotificationSender);
exporter.setBeans(beans);
In this way created MBeanExporter
bean then tries to prepare my jmxNotificationSender
. Among others exporter invokes createAndConfigureMBean
method, which in turn uses MBeanInfoAssembler
to scan jmxNotificationSender
to obtain some information. I could trace down, that AbstractReflectiveMBeanInfoAssembler
as an implementation is used here. This AbstractReflectiveMBeanInfoAssembler
invokes getOperationParameters
method, which actually causes the warning since it discovers method parameters (introspection).
Will this issue somehow be handled in the future?
Tested with Spring Framework 6.0.9 and Java 17
Comment From: bclozel
Have you tried compiling your application with the -parameters
compiler flag as suggested in the upgrade notes?
Comment From: Sebottenhof99
Hello=) yes, sure. And it works out. With this solution I just have a feeling, that it is not a proper solution, but a workaround to push the warning away...maybe I am wrong here
Comment From: sbrannen
Hello=) yes, sure. And it works out.
Thanks for the confirmation.
Closing this issue as a result.
With this solution I just have a feeling, that it is not a proper solution, but a workaround to push the warning away...maybe I am wrong here
It's not a workaround. It's the appropriate action to take. The -debug
option is deprecated.
Furthermore, LocalVariableTableParameterNameDiscoverer
(which relied on -debug
) no longer exists in Spring Framework 6.1.
-
29559
Comment From: Sebottenhof99
@sbrannen got it, thank you!!