[ 
https://issues.apache.org/jira/browse/ARTEMIS-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551645#comment-17551645
 ] 

ASF subversion and git services commented on ARTEMIS-3854:
----------------------------------------------------------

Commit 0c5e83b76a960edecd6819af3d60829a6cc9ef69 in activemq-artemis's branch 
refs/heads/main from Robbie Gemmell
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=0c5e83b76a ]

ARTEMIS-3854: use Process.pid() rather than reflection


> tests using reflection to get process pid fail on Java 17
> ---------------------------------------------------------
>
>                 Key: ARTEMIS-3854
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3854
>             Project: ActiveMQ Artemis
>          Issue Type: Test
>          Components: Tests
>    Affects Versions: 2.23.0
>            Reporter: Robbie Gemmell
>            Priority: Major
>             Fix For: 2.24.0
>
>
> A few of the tests use reflection to get the pid of a process from 
> java.lang.ProcessImpl, which no longer works by default on newer Java 
> releases such as 17 (probably 16+).
> Though the existing approach can be made to with an --add-opens flag, this 
> route is actually no longer necessary as a pid() accessor was added to the 
> Process interface in Java 9, so since the codebase now requires Java 11 we 
> can just simply update the tests to use that method.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to