[ https://issues.apache.org/jira/browse/QPID-8376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16977951#comment-16977951 ]
Alex Rudyy commented on QPID-8376: ---------------------------------- [~rgodfrey], as part of implemented changes the calls to {{Method#setAccessible(true)}} are added to make methods {{getProcessCpuTime}} and {{getProcessCpuLoad}} publicly accessible. Those method accessibility change calls fail on JDK 11 and above with exception {{java.lang.reflect.InaccessibleObjectException}} being thrown. Taking that modified methods are already public, the calls to change accessibility seem redundant. I looked through Oracle JDK 8, Open JDK 11-12 and IBM JDK 8 to verify the visibility of methods {{getProcessCpuTime}} and {{getProcessCpuLoad}}. The methods are public on the JDKs I looked through. I would suggest to remove the calls to {{Method#setAccessible(true)}} or add an exception handling logic for the calls (if there are JDKs with non-public methods {{getProcessCpuTime}} and {{getProcessCpuLoad}}) > [Broker-J] Add Process CPU time to collected Broker statistics > -------------------------------------------------------------- > > Key: QPID-8376 > URL: https://issues.apache.org/jira/browse/QPID-8376 > Project: Qpid > Issue Type: Improvement > Components: Broker-J > Reporter: Robert Godfrey > Assignee: Robert Godfrey > Priority: Minor > Fix For: qpid-java-broker-8.0.0 > > > As per > [this|http://qpid.2158936.n2.nabble.com/Broker-J-statistics-and-CPU-consumption-tp7687889.html] > discussion on the mailing list - add the ability to capture CPU time and CPU > load from the broker statistics (where available from the underlying JVM > platform. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org